User Tools

Site Tools


cdc:nos2.source:nam5871:ssbtbw

SSBTBW

Table Of Contents

  • [00004] SSBTBW - TEST BIT IN WORD.
  • [00007] TEST BIT IN WORD.

Source Code

SSBTBW.txt
  1. *DECK SSBTBW
  2. IDENT SSBTBW
  3. ENTRY SSBTBW
  4. TITLE SSBTBW - TEST BIT IN WORD.
  5. *COMMENT TEST BIT IN WORD.
  6. SSBTBW SPACE 4,10
  7. *** SSBTBW - TEST BIT IN WORD.
  8. *
  9. * S.H. FISCHER. 81/08/17.
  10. SPACE 4,10
  11. *** SSBTBW IS A ROUTINE TO EFFICIENTLY TEST A BIT IN A WORD TO
  12. * THE RIGHT OF BIT 48. THE BIT NUMBER IS 1 FOR BIT 47, 2 FOR
  13. * BIT 46, ETC.
  14. SPACE 4,10
  15. *** SYMPL CALLING SEQUENCE.
  16. *
  17. * SSBTBW( WORD, BITN, COND)
  18. *
  19. * WORD = WORD TO TEST BIT IN.
  20. *
  21. * BITN = BIT NUMBER TO CLEAR.
  22. *
  23. * COND = CONDITION OF BIT, 0 IF NOT SET, 1 IF SET.
  24. TBW SPACE 4,10
  25. SSBTBW EQ *+1S17D
  26. TBWX EQU *
  27. SA3 A1+1 BIT NUMBER ADDRESS
  28. SA2 X1 WORD
  29. MX4 -1
  30. SA3 X3 BIT NUMBER
  31. SB7 X3+12 FOR SHIFT TO BIT 0
  32. SA5 A1+2 COND ADDRESS
  33. LX2 B7 POSITION WORD
  34. BX6 -X4*X2 EXTRACT BIT
  35. SA6 X5 STORE RESULT
  36. EQ TBWX RETURN
  37. END
cdc/nos2.source/nam5871/ssbtbw.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator