Returns the status of a given bit into a bitarray (0 or !0)
u8 cpct_getBit (void* array, u16 index);
(2B DE) array | Pointer to the first byte of the array |
(2B HL) index | Position of the bit in the array to be retrieved |
u8 | Status of the selected bit: false (0) when the bit value is 0, true (> 0) when the bit value is 1. Take into account that >0 means any value different than 0, and not necessarily 1. |
Returns 0 or >0 depending on the value of the bit at the given position (index) in the specified array. It will assume that the array elements have a size of 8 bits and also that the given position is not bigger than the number of bits in the array (size of the array multiplied by 8).
AF, BC, DE, HL
C-bindings | 31 bytes |
ASM-bindings | 28 bytes |
bitWeights | +8 bytes vector required by both bindings. Take into account that this vector is included only once if you use different functions referencing to it. |
Case | microsec (ms) | Cycles -------------------------------------- Any | 44 | 176 -------------------------------------- ASM-Saving | -12 | -48 --------------------------------------