*DECK SSBFPB
IDENT SSBFPB
ENTRY SSBFPB
TITLE SSBFPB - FIND PRIORITY BIT.
*COMMENT FIND PRIORITY BIT.
SSBFPB SPACE 4,10
*** SSBFPB- FIND PRIORITY BIT.
*
* S. H. FISCHER. 81/07/16.
SPACE 4,10
*** SSBFPB IS A ROUTINE TO EFFICIENTLY FIND THE FIRST BIT SET
* IN A WORD TO THE RIGHT OF BIT 48. THE VALUE RETURNED IS 1
* FOR BIT 47, 2 FOR BIT 46 ETC. 49 IS RETURNED FOR ALL BITS
* CLEAR.
SPACE 4,10
*** SYMPL CALLING SEQUENCE.
*
* SSBFPB( WORD, BITN).
*
* WORD = WORD TO FIND BIT IN.
*
* BITN = BIT NUMBER RETURNED.
FPB SPACE 4,10
SSBFPB EQ *+1S17D
FPBX EQU *
SA2 X1 WORD
SA1 A1+1 ADDRESS TO RETURN BIT
PX2 B0 GENERATE LEGAL EXPONENT
NX2,B7 X2 FIND BIT
SX6 B7+1
SA6 X1 STORE BIT NUMBER
EQ FPBX RETURN
END