BIT
Bit Set/Reset
BIT p, bit, dst
Operation
Description
Flags
Attributes
Mnemonic
BIT
Example
UM012811-0904
Downloaded from
Elcodis.com
electronic components distributor
←
dst[bit]
p
The selected bit in the destination operand is the binary value p (0 or 1). All other bits are
unaffected.
C
Unaffected.
Z
Set if the result is zero; reset otherwise.
S
Set if the result is negative; reset otherwise.
V
Reset to 0.
D
Unaffected.
H
Unaffected.
Polarity, Bit,
Destination
Opcode (Hex)
p, bit, r1
E2
•
If Working Register R7 contains the value
BIT 0, 4, R7
Object Code: E2 47
leaves the value
(00101000B) in Working Register R7 and clears the V flag.
28H
•
If Working Register R7 contains the value
BIT 1, 2, R7
Object Code: E2 A7
leaves the value
(00111010B) in Working Register R7 and clears the V flag.
3AH
Operand 1
Operand 2
{p, bit, r1}
—
(00111000B), the statement:
38H
(00111000B), the statement:
38H
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
70
Operand 3
—
Need help?
Do you have a question about the eZ8 and is the answer not in the manual?