Table 3-8. Bit-Manipulation Instructions (2)
Note: * Size: operand size
B: Byte
Notes on Bit Manipulation Instructions: BSET, BCLR, BNOT, BST, and BIST are read-modify-
write instructions. They read a byte of data, modify one bit in the byte, then write the byte back.
Care is required when these instructions are applied to registers with write-only bits and to the I/O
port registers.
Example: BCLR is executed to clear bit 0 in the port 4 data direction register (P4DDR) under the
following conditions.
P4
7
:
Input pin, Low
P4
6
:
Input pin, High
P4
5
– P4
0
:
Output pins, Low
The intended purpose of this BCLR instruction is to switch P4
0
from output to input.
Instruction
Size*
Function
BIXOR
B
C
⊕
¬ [(<bit-No.> of <EAd>)]
→
C
XORs the C flag with the inverse of a specified bit in a general register
or memory.
The bit number is specified by 3-bit immediate data.
BLD
B
(<bit-No.> of <EAd>)
→
C
Copies a specified bit in a general register or memory to the C flag.
BILD
¬ (<bit-No.> of <EAd>)
→
C
Copies the inverse of a specified bit in a general register or memory to
the C flag.
The bit number is specified by 3-bit immediate data.
BST
B
C
→
(<bit-No.> of <EAd>)
Copies the C flag to a specified bit in a general register or memory.
BIST
¬ C
→
(<bit-No.> of <EAd>)
Copies the inverse of the C flag to a specified bit in a general register or
memory.
The bit number is specified by 3-bit immediate data.
Step
Description
1
Read
Read one data byte at the specified address
2
Modify
Modify one bit in the data byte
3
Write
Write the modified data byte back to the specified address
44
Содержание H8/326 Series
Страница 67: ...58 ...
Страница 121: ...112 ...
Страница 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Страница 279: ...270 ...