comparison 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
comparison
equal deleted inserted replaced
58:23dba7f60f88 59:2ff1b30b1bdf
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 movlw LOW d'1000' 128 movf amb_pressure+0,W
129 addwf xC+0,F 129 addwf xC+0,F
130 movlw HIGH d'1000' 130 movf amb_pressure+1,W
131 addwfc xC+1,F ; Add 1000mBar 131 addwfc xC+1,F ; Add ambient pressure
132 132
133 movff xC+0,sim_pressure+0 133 movff xC+0,sim_pressure+0
134 movff xC+1,sim_pressure+1 134 movff xC+1,sim_pressure+1
135 135
136 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values 136 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values
222 WIN_INVERT .1 222 WIN_INVERT .1
223 DISPLAYTEXT .12 ;" Wait.." 223 DISPLAYTEXT .12 ;" Wait.."
224 WIN_INVERT .0 224 WIN_INVERT .0
225 225
226 simulator_calc_deco_loop1: 226 simulator_calc_deco_loop1:
227
228 ; movlw .011
229 ; call PLED_SetColumn
230 ; movlw .009
231 ; call PLED_SetRow
232 ; lfsr FSR2,letter
233 ; movff char_O_array_decodepth+0,lo ; Get Depth
234 ; bsf leftbind
235 ; output_8
236 ; bcf leftbind
237 ; movlw ' '
238 ; movwf POSTINC2
239 ;call word_processor
240
241
242 call divemode_check_decogases ; Checks for decogases and sets the gases 227 call divemode_check_decogases ; Checks for decogases and sets the gases
243 call divemode_prepare_flags_for_deco 228 call divemode_prepare_flags_for_deco
244 229
245 call deco_main_calc_hauptroutine ; calc_tissue 230 call deco_main_calc_hauptroutine ; calc_tissue
246 movlb b'00000001' ; rambank 1 selected 231 movlb b'00000001' ; rambank 1 selected
255 movlw d'255' 240 movlw d'255'
256 movff WREG,char_O_deco_status ; Reset Deco module 241 movff WREG,char_O_deco_status ; Reset Deco module
257 242
258 simulator_calc_deco_loop2: 243 simulator_calc_deco_loop2:
259 call PLED_simulator_data 244 call PLED_simulator_data
260
261 ; Debugger
262 ; call enable_rs232
263 ; movff char_I_deco_He_ratio5,TXREG
264 ; call rs232_wait_tx ; wait for UART
265 ; movff char_I_deco_N2_ratio5,TXREG
266 ; call rs232_wait_tx ; wait for UART
267 ; movff char_I_deco_He_ratio4,TXREG
268 ; call rs232_wait_tx ; wait for UART
269 ; movff char_I_deco_N2_ratio4,TXREG
270 ; call rs232_wait_tx ; wait for UART
271 ; movff char_I_deco_He_ratio3,TXREG
272 ; call rs232_wait_tx ; wait for UART
273 ; movff char_I_deco_N2_ratio3,TXREG
274 ; call rs232_wait_tx ; wait for UART
275 ; movff char_I_deco_He_ratio2,TXREG
276 ; call rs232_wait_tx ; wait for UART
277 ; movff char_I_deco_N2_ratio2,TXREG
278 ; call rs232_wait_tx ; wait for UART
279 ; movff char_I_deco_He_ratio,TXREG
280 ; call rs232_wait_tx ; wait for UART
281 ; movff char_I_deco_N2_ratio,TXREG
282 ; call rs232_wait_tx ; wait for UART
283 ; movff char_I_deco_gas_change5,TXREG
284 ; call rs232_wait_tx ; wait for UART
285 ; movff char_I_deco_gas_change4,TXREG
286 ; call rs232_wait_tx ; wait for UART
287 ; movff char_I_deco_gas_change3,TXREG
288 ; call rs232_wait_tx ; wait for UART
289 ; movff char_I_deco_gas_change2,TXREG
290 ; call rs232_wait_tx ; wait for UART
291 ; movff char_I_deco_gas_change,TXREG
292 ; call rs232_wait_tx ; wait for UART
293 ;
294 245
295 btg LED_red 246 btg LED_red
296 247
297 call divemode_check_decogases ; Checks for decogases and sets the gases 248 call divemode_check_decogases ; Checks for decogases and sets the gases
298 call divemode_prepare_flags_for_deco 249 call divemode_prepare_flags_for_deco