![Samsung S3C80M4/F80M4 User Manual Download Page 186](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174186.webp)
INSTRUCTION SET
S3C80M4/F80M4
6-84
TCM
—
Test Complement Under Mask
TCM
dst,src
Operation:
(NOT dst) AND src
This instruction tests selected bits in the destination operand for a logic one value. The bits to be
tested are specified by setting a "1" bit in the corresponding position of the source operand
(mask). The TCM statement complements the destination operand, which is then ANDed with the
source mask. The zero (Z) flag can then be checked to determine the result. The destination and
source operands are unaffected.
Flags: C:
Unaffected.
Z:
Set if the result is "0"; cleared otherwise.
S:
Set if the result bit 7 is set; cleared otherwise.
V:
Always cleared to "0".
D:
Unaffected.
H:
Unaffected.
Format:
Bytes Cycles Opcode
(Hex)
Addr Mode
dst src
opc
dst | src
2 4 62 r
r
6 63
r
lr
opc src dst
3 6 64 R
R
6 65
R
IR
opc dst src
3 6 66 R
IM
Examples:
Given: R0 = 0C7H, R1 = 02H, R2 = 12H, register 00H = 2BH, register 01H = 02H, and
register 02H = 23H:
TCM R0,R1
→
R0 = 0C7H, R1 = 02H, Z = "1"
TCM R0,@R1
→
R0 = 0C7H, R1 = 02H, register 02H = 23H, Z = "0"
TCM 00H,01H
→
Register 00H = 2BH, register 01H = 02H, Z = "1"
TCM 00H,@01H
→
Register 00H = 2BH, register 01H = 02H,
register 02H = 23H, Z = "1"
TCM 00H,#34
→
Register 00H = 2BH, Z = "0"
In the first example, if working register R0 contains the value 0C7H (11000111B) and register R1
the value 02H (00000010B), the statement "TCM R0,R1" tests bit one in the destination register
for a "1" value. Because the mask value corresponds to the test bit, the Z flag is set to logic one
and can be tested to determine the result of the TCM operation.
Summary of Contents for S3C80M4/F80M4
Page 1: ...S3C80M4 F80M4 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Page 44: ...ADDRESS SPACES S3C80M4 F80M4 2 20 NOTES ...
Page 84: ...CONTROL REGISTERS S3C80M4 F80M4 4 26 NOTES ...
Page 102: ...INTERRUPT STRUCTURE S3C80M4 F80M4 5 18 NOTES ...
Page 190: ...INSTRUCTION SET S3C80M4 F80M4 6 88 NOTES ...
Page 202: ...RESET and POWER DOWN S3C80M4 F80M4 8 6 NOTES ...
Page 216: ...8 BIT TIMER 0 S3C80M4 F80M4 11 4 NOTES ...
Page 220: ...8 BIT PULSE WIDTH MODULATION S3C80M4 F80M4 12 4 NOTES ...
Page 230: ...ELECTRICAL DATA S3C80M4 F80M4 13 10 NOTES ...