--- DarthVader/TrackerLevel2/src/F77/filladc.f 2014/01/16 15:29:53 1.11 +++ DarthVader/TrackerLevel2/src/F77/filladc.f 2014/01/17 12:56:50 1.12 @@ -126,8 +126,8 @@ $ nst(is).gt.0.and. $ nst(is).le.nstrips_va1.and. $ .true.)then - newVAL=oldVAL- - $ nint(pedestal_t(DSPn,nvk(is),nst(is)) ! EM GCC4.7 + newVAL=oldVAL+nint( + $ -pedestal_t(DSPn,nvk(is),nst(is)) ! EM GCC4.7 $ +pedestal_t(DSPn,nvk(js),nst(js)),2) ! EM GCC4.7 newVAL=max(int(0,2),newVAL) ! EM GCC4.7 newVAL=min(int(4095,2),newVAL) @@ -180,7 +180,7 @@ $ nst(is).gt.0.and. $ nst(is).le.nstrips_va1.and. $ .true.)then - newVAL=oldVAL-nint( ! EM GCC4.7 + newVAL=oldVAL+nint( ! EM GCC4.7 $ -pedestal_t(DSPn,nvk(is),nst(is)) $ +pedestal_t(DSPn,nvk(js),nst(js)),2)! EM GCC4.7 newVAL=max(int(0,2),newVAL)! EM GCC4.7 @@ -372,6 +372,9 @@ C flag=iand(word,z'f000') hexmask=z'7000' hexmask=IBSET(hexmask,15) ! it is not possible to set the sign bit with F000, we must set the sign bit with ibset +c print *,' hexmask ',hexmask +c write(*,22)hexmask +c 22 FORMAT(2X,'hexmask: ',2X,Z8) flag=iand(word,hexmask) C END EM flag=ishft(flag,-12)