*
* $Id$
*
* $Log$
* Revision 1.1  1996/03/08 15:21:54  mclareni
* Initial revision
*
*
#if defined(CERNLIB_ND100B32)
%      SUBROUTINE CFRIB(ARRAY,NW)
%      +++++++NORD10/100 VERSION++++++++++
%      VERSION 1-12-81
%
%      CONVERT FIRST NW WORDS OF ARRAY FROM IBM TO NORD FORMAT.
%      ON RETURN,ARRAY CONTAINS CONVERTED VALUES.
)9BEG;)9LIB CFRIB;)9ENT CFRIB;
%
%
%
%
CFRIB,SWAP SA DB;COPY SL DD;STD SAVEB;
LDX I 1,B;RADD SX DX;LDA 0,B;RADD SX DA;COPY SA DB;COPY CM2 SX DX;
LOOP=*;
LDD 0,B,X;COPY SA DL;BSET ZRO 170 DA;COPY SA DT;
SHT ZIN SHR 10;SHT ZIN 2;AAT -1;
BIT24,BSKP ONE 70 DL;JMP BIT23;AAT 1;SAD ZIN SHR 1;JMP NEXT;
BIT23,BSKP ZRO 60 DL;JMP NEXT;
BIT22,BSKP ONE 50 DL;JMP BIT21;AAT -1;SAD ZIN  1;JMP NEXT;
BIT21,BSKP ONE 40 DL;JMP ERROR;AAT -2;SAD ZIN  2;JMP NEXT;
ERROR,SAA 0;COPY SA DD;JMP ENDR;
NEXT,BSKP ONE 110 DT;JMP OK;LDD MAXND;JMP ENDR;
SKP IF 0 LSS ST;JMP ERROR;
OK,SHT ZIN 6;AND (77;RADD ST DA;
ENDR,BSKP ZRO 170 DL;BSET ONE 170 DA;
STD 0,B,X;RINC DX;JNC LOOP;
XFRIB,LDD SAVEB;COPY SA DB;COPY SD DP;
SAVEB,0;0;
MAXND,77777;177777;
)FILL;)9END;
#endif
