In post

Darrel Taylor shows an example of how to use the OWIN/OUT commands that will accept a WORD variable
that can address ANY pin on the chip in a loop. He also says The same concept can work for any command that
uses "PIN Numbers", does any one know how to change the appropriate macro for the BUTTON command.

I have a controller with a PIC16F877 that PortB.2 is used by the controller board, and I would like
to use PortB and PortD for button inputs, or input pin state in a loop.