Returns the value of a given group of 4 bits into an array ( [0-15] )
u8 cpct_get4Bits (void* array, u16 index);
(2B DE) array | Pointer to the first byte of the array |
(2B HL) index | Position of the group of 4 bits to be retrieved from the array |
u8 | Value of the selected group of 4 bits: [0-15] |
Returns a value from 0 to 15 depending on the value of the 4-bits group 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 2).
AF, BC, DE, HL
29 bytes
Case | Cycles | microSecs (us) ----------------------------------- Best (1) | 128 | 32.00 ----------------------------------- Worst (0) | 151 | 37.75 -----------------------------------