Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 3 - Mathematical and Logical Utilities / Mathematical and Logical Utilities Reference
Routines / Testing and Setting Bits


BitSet

You can use the BitSet procedure to set a particular bit.

PROCEDURE BitSet (bytePtr: Ptr; bitNum: LongInt);
bytePtr
A pointer to a byte in memory.
bitNum
The bit to be set, specified as a positive offset from the high-order bit of the byte pointed to by the bytePtr parameter. The bit being set need not be in the byte pointed to by bytePtr.
DESCRIPTION
The BitSet procedure sets (to a value of 1) the bit specified by the bytePtr and bitNum parameters.

SPECIAL CONSIDERATIONS
The bit-numbering scheme used by the BitSet procedure is the opposite of MC680x0 bit numbering. To convert an MC680x0 bit number to the format required by the BitSet procedure, subtract the MC680x0 bit number from the highest bit number.

SEE ALSO
For an example of the use of the BitSet procedure, see page 3-16. For more information about reversed bit-numbering see "Reversed Bit-Numbering" on page 3-7.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice