The COMF command will invert the contents of register f. The result of
the compliment is either stored in the working register (d=0) or in the
register specified by f (d=1).
Status Flags Effected:
|Code Example 1:
Assume we have a register labeled TEMP with the value 10101010. The
following commands will compliment the value in TEMP and store the
result in the working register.
||W = "01010101"
The COMF command is very powerful and can, in some cases, replace a
lot of code. One example where I've used the command for is to convert
data from a seven segment data lookup table for common anode displays
to common cathode. With COMF, this process is accomplished with a
single command and without haveing to modify the data lookup table.
of course, only works if the same conection scheme is used on the port
that is controlling displayed data on the LED display.