I think you have your terminology confused. A macro is a list of directives that tells the linker to do someting such as
#define USART1_BAUDRATE(br, fosc) ((fosc)/((br)*161)-1)
it is usually some sort of value replacement and macro commands have a very limited number of commands. To do a binary search you will need to write a program (or fuction) in C itself.
Good Luck, John