English
Language : 

MC68HC11G5 Datasheet, PDF (158/195 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcontroller
Freescale Semiconductor, Inc.
12.3.1.5
Data Testing and Bit Manipulation
This group of instructions is used to operate on operands as small as a single bit, but these
instructions can also operate on any combination of bits within any 8-bit location in the 64 kbyte
memory space. The bit test (BITA or BITB) instructions perform an AND operation within the CPU
to update condition code bits without altering either operand. The BSET and BCLR instructions read
the operand, manipulate selected bits within the operand, and write the result back to the operand
address. Some care is required when read-modify-write instructions such as BSET and BCLR are
used on I/O and control register locations because the physical location read is not always the same
as the location written.
Table 12-5. Data Testing and Bit Manipulation
Function
Bit(s) Test A with Memory
Bit(s) Test B with Memory
Clear Bit(s) in Memory
Set Bit(s) in Memory
Branch if Bit(s) Clea
Branch if Bit(s) Se
Mnemonic IMM DIR EXT INDX INDY
BITA
X
X
X
X
X
BITB
X
X
X
X
X
BCLR
X
X
X
BSET
X
X
X
BRCLR
X
X
X
BRSET
X
X
X
12-8
CPU, ADDRESSING MODES AND INSTRUCTION SET
For More Information On This Product,
Go to: www.freescale.com