MC_TITLE  FPVDEC  Converts from Varian floating point to dec F floating point. C_HISTROY R.Mehlman 5/25/82     C_CALLS IEOR,ISHFT      FUNCTION FPVDEC(FPV)C_ARGUMENTS O      REAL*4 FPV   ![B] Floating point value to be converted to DEC F floating.C_END      REAL*4 R,S      INTEGER*4 L      INTEGER*2 W(2),WSAVE      BYTE B(4),BSAVE      EQUIVALENCE (F,L,W,B)      F=FPVC  SWAP BYTES       BSAVE=B(1)      B(1)=B(2)      B(2)=BSAVE      BSAVE=B(3)      B(3)=B(4)      B(4)=BSAVE;C  SAVE SIGN, TAKE 1'S COMPLEMENT OF HIGH ORDER WORD IF NEG
      S=1.      IF (W(1).GE.0) GO TO 10      S=-1.      W(1)=IEOR(W(1),'FFFF'X)C  SWAP WORDS, DROP HIDDEN BIT 10   WSAVE=W(2)      W(2)=W(1)      W(1)=0      L=ISHFT(L,-6)      W(2)=ISHFT(W(2),-1)      L=ISHFT(L,6)      W(1)=WSAVE<C  SHIFT LOW ORDER WORD PAST 0 IN BIT 15 AND INTO VACANT LOW C   ORDER BIT OF HIGH ORDER WORD      W(1)=ISHFT(W(1),1)      L=ISHFT(L,1)C  SWAP WORDS AGAIN      WSAVE=W(1)      W(1)=W(2)      W(2)=WSAVEC  RESTORE SIGN      FPVDEC=F*S      RETURN	      END