The C2C function input_port_bit_b will return a non-zero value (1) if the particular input pin is set high. You tell the function which bit to look at by the number in the function call:

input_port_bit_b (0) ;

- would return true if bit number 0 is set. The C2C compiler will drop the PICmicro assembler instructions to read this port, but as far as we are concerned it looks like a function has been called to do the job. Remember that the parameter to this function (in this case the value 0) is the number of the bit we are working on.

Note that we use this call in a condition and that the state of this bit will change the sequence of instructions which our program runs. A lot of our programs will respond to user input in this way. There is of course a matching input_port_bit_a function to read the other input port.