The following macro-function, defined with the #define preprocessor directive:

#define HIWORD(n) (bitzrshift((n),16))

extracts the high word (16 bits) of a 32-bit integer. Shifting the bits 16 places to the right with BITZRSHIFT( ) moves the high word into the low word, filling the now-vacated high bits with zeros, resulting in a 32-bit integer with the same value as the original high word.