User Tools

Site Tools


cdc:nos2.source:nam5871:ssbsbw

SSBSBW

Table Of Contents

  • [00004] SSBSBW - SET BIT IN WORD.

Source Code

SSBSBW.txt
  1. *DECK SSBSBW
  2. IDENT SSBSBW
  3. ENTRY SSBSBW
  4. TITLE SSBSBW - SET BIT IN WORD.
  5. *COMMENT SET BIT IN WORD.
  6. SSBSBW SPACE 4,10
  7. *** SSBFBW - SET BIT IN WORD.
  8. *
  9. * S. H. FISCHER. 81/07/15.
  10. SPACE 4,10
  11. *** SSBSBW IS A ROUTINE TO EFFICIENTLY SET 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. * SSBSBW( WORD, BITN)
  18. *
  19. * WORD = WORD TO SET BIT IN.
  20. *
  21. * BITN = BIT NUMBER TO SET.
  22. SBW SPACE 4,10
  23. SSBSBW EQ *+1S17D
  24. SBWX EQU *
  25. SA3 A1+1 BIT NUMBER ADDRESS
  26. SA2 X1 WORD
  27. MX4 1
  28. SA3 X3 BIT NUMBER
  29. SB7 X3-49 B7 = N - 49 = -( 49 - N )
  30. LX4 -B7 POSITION BIT
  31. BX6 X2+X4 SET BIT
  32. SA6 X1 STORE WORD
  33. EQ SBWX RETURN
  34. END
cdc/nos2.source/nam5871/ssbsbw.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator