5
INSTRUCTION SET
36
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
5
.
12
Bit Manipulation Instructions
The following four instructions are provided for manipulating the data in memory bitwise or one bit at a time.
These instructions allow the display memory or I/O map control bits to be altered directly.
btst [
%rb
],
imm3
Set the Z flag if a specified bit =
0
bclr [
%rb
],
imm3
Clear a specified bit to
0
bset [
%rb
],
imm3
Set a specified bit to
1
bnot [
%rb
],
imm3
Invert a specified bit (
1
↔
0
)
Bit manipulation is performed on the memory address specified by the
rb
(general-purpose) register.
imm3
specifies
a bit number (bits
0
–
7
) in the byte data stored in that address location.
Although the content of memory data altered by these instructions (except
btst
) is only the specified bit, the
specified address is rewritten because memory is accessed bytewise. Therefore, if the addresses to be manipulated
have any I/O control bits mapped whose function is enabled by a bit write operation, use of these instructions
requires caution.