comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 478:fd8266b511cc

New SAC (CF56/CF57) in 5..50 l/min range (no more decimal).
author JeanDo
date Wed, 12 Oct 2011 19:02:38 +0200
parents 7779bfa89171
children 9fc8feff27a5
comparison
equal deleted inserted replaced
477:1b09cead63a8 478:fd8266b511cc
3382 movwf xA+0 3382 movwf xA+0
3383 movlw d'0' 3383 movlw d'0'
3384 addwfc xC+1,W 3384 addwfc xC+1,W
3385 movwf xA+1 ; xA:2 holds total dive seconds 3385 movwf xA+1 ; xA:2 holds total dive seconds
3386 3386
3387 ;---- Multiply by SAC, and divide by 600 (SAC in 0.1 liters per minutes) 3387 ;---- Multiply by SAC, and divide by 60 (SAC inliters per minutes)
3388 GETCUSTOM8 d'56' ; Get bottom SAC 3388 GETCUSTOM8 d'56' ; Get bottom SAC
3389 movwf xB+0 3389 movwf xB+0
3390 clrf xB+1 3390 clrf xB+1
3391 call mult16x16 ; xC:4=xA:2*xB:2 3391 call mult16x16 ; xC:4=xA:2*xB:2
3392 3392
3393 movlw LOW(.600) 3393 movlw LOW(.60)
3394 movwf xB+0 3394 movwf xB+0
3395 movlw HIGH(.600) 3395 movlw HIGH(.60)
3396 movwf xB+1 3396 movwf xB+1
3397 call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder 3397 call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder
3398 3398
3399 ;---- Multiply by average pressure [absolute, in bar] 3399 ;---- Multiply by average pressure [absolute, in bar]
3400 movff xC+0,xA+0 ; Get result (in xC+0, noy xC+2 !) into xA 3400 movff xC+0,xA+0 ; Get result (in xC+0, noy xC+2 !) into xA