Bcp — Bit Compare - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.5 BCP — BIT COMPARE
dst,src.b
BCP
dst(0) – src(b)
Operation:
The specified bit of source is compared to (subtracted from) bit zero (LSB) of destination. Zero
flag is set if the bits are same; otherwise it is cleared. The contents of both operands remain
unaffected by the comparison.
C: Unaffected.
Flags:
Z: Set if the two bits are the same; cleared otherwise.
S: Cleared to "0".
V: Undefined.
D: Unaffected.
H: Unaffected.
Format:
opc
In the second byte of instruction format, the destination address is four bits, the bit address 'b' is three bits,
NOTE:
and the LSB address value is one bit in length.
Given R1 = 07H and register 01H = 01H:
Example:
BCP
If the destination working register R1 contains the value 07H (00000111B) and the source register
01H contains the value 01H (00000001B), the statement "BCP R1,01H.1" compares bit one of
the source register (01H) and bit zero of the destination register (R1). Since the bit values are not
identical, the zero flag bit (Z) is cleared in the FLAGS register (0D5H).
dst | b | 0
src
R1,01H.1
Bytes
3
R1 = 07H, register 01H = 01H
6-17
6 INSTRUCTION SET
Cycles
Opcode
(Hex)
6
17
Addr Mode
dst
src
r0
Rb

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents