COMMAND BSF

The PICmicro can have any individual bit of any file byte acted upon directly. Each bit can be set high or low by a single command. As we shall see later, a single command will also determine the status of any individual bit.

Command BSF translates as Bit Set File and is always followed by two numbers or names separated by a comma. The first number or name is the file byte whose bit is to be acted upon. The second number or name is the number of the bit within the file byte (between 7 and 0, reading from left to right).

As an example, the command BSF 3,5 in Listing 2 instructs the PICmicro to set (make high, force to logic 1!) bit 5 of file number 3; command BSF 6,1 means that bit 1 of file number 6 is to be set.

COMMAND BCF

Command BCF stands for Bit Clear File and is the exact opposite of BSF.

As an example, the command BCF 3,5 in Listing 2 means that bit 5 of file 3 is to be cleared (set low, made/forced to logic 0!).

Now use the contents tree to navigate to Tutorial 2.7.