Hardware manual
Microcomputer Technical Q&A
18
Q&A No.: QAH8S-017
Category: Instruction
Subject: BLD and BIST Instructions
Question
How are bit-manipulation instructions such as BLD and BIST used?
Answer
These instructions can be used to invert any bit data in memory, and store the value in a bit of
another memory address, as shown in the flowchart below.
START
END
Bit n of IN = 0?
Bit n of OUT ← 1
Bit n of OUT ← 0
No
Yes
Using BLD and BIST Not Using BLD and BIST
BLD #n,@IN
BIST #m,@OUT
BTST #n,@IN
BNE L1
BSET #n,@OUT
BRA L2
L1: BCLR #n,@OUT
L2:
8 bytes/7 states 16 bytes/11 states