User manual
152
mikoC PRO for dsPIC
MikroElektronika
Prototype
unsigned int LoWord(unsigned long number);
Description The function returns low word of number. The function does not interpret bit patterns of number – it
merely returns 16 bits as found in register.
This is an “inline” routine; code is generated in the place of the call, so the call doesn’t count against
the nested call limit.
Parameters number: input number
Returns Low word of number, bits 15..0.
Requires Nothing.
Example
d = 0x12345678;
tmp = LoWord(d); // Equals 0x5678
LoWord(d) = 0xAAAA; // d equals 0x1234AAAA
Notes None.
Prototype
unsigned int HiWord(unsigned long number);
Description The function returns high word of number. The function does not interpret bit patterns of number – it
merely returns 16 bits as found in register.
This is an “inline” routine; code is generated in the place of the call, so the call doesn’t count against
the nested call limit.
Parameters number: input number
Returns High word of number, bits 31..16.
Requires Nothing.
Example
d = 0x12345678;
tmp = HiWord(d); // Equals 0x1234
HiWord(d) = 0xAAAA; // d equals 0xAAAA5678
Notes None.
LoWord
HiWord