comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 596:d7eeaffd8fc1

CNS in planner (pSCR-GF)
author heinrichsweikamp
date Thu, 21 Jun 2012 07:30:13 +0200
parents 46e9ccd0eca7
children 9c13bf8a3033
comparison
equal deleted inserted replaced
595:16f4eafc197e 596:d7eeaffd8fc1
389 movlw .6 389 movlw .6
390 cpfseq EEDATA 390 cpfseq EEDATA
391 bra simulator_calc_deco1 391 bra simulator_calc_deco1
392 ; in PSCR mode, compute fO2 into char_I_O2_ratio 392 ; in PSCR mode, compute fO2 into char_I_O2_ratio
393 call compute_pscr_ppo2 ; pSCR ppO2 into sub_c:2 393 call compute_pscr_ppo2 ; pSCR ppO2 into sub_c:2
394 ; tstfsz sub_c+1 ; Is ppO2 > 2.55bar ? mH 394 movff sub_c+0,xA+0
395 ; setf sub_c+0 ; yes: bound to 2.55... better than wrap around. 395 movff sub_c+1,xA+1
396 movff sub_c+0,char_I_actual_ppO2 ; copy last ppO2 to buffer register 396 movlw d'100'
397 397 movwf xB+0
398 clrf xB+1
399 call div16x16 ; /100
400 tstfsz xC+1 ; Is ppO2 > 2.55bar ?
401 setf xC+0 ; yes: bound to 2.55... better than wrap around.
402 movff xC+0,char_I_actual_ppO2 ; copy last ppO2 to buffer register (for pSCR CNS)
398 movff sub_c+0,xA+0 403 movff sub_c+0,xA+0
399 movff sub_c+1,xA+1 404 movff sub_c+1,xA+1
400 movlw LOW .10 405 movlw LOW .10
401 movwf xB+0 406 movwf xB+0
402 movlw HIGH .10 407 movlw HIGH .10