.75
P
Â
TCM
Test Complement Under Mask
Example: Working register R14 contains the value F3H (11110011B). Working register R5 contains CBH.
Register CBH contains 88H (10001000B) (bit 7 and bit 3 are tested if they are 1). The following statement
resets the Z flag to 0, because bit 3 in the destination operand is not a 1. The V and S flags are also set to 0.
TCM R14, @R5
Op Code: 63 E5
Example: Register D4H contains the value 04H (000001000B). Working register R0 contains the value
80H (10000000B) (bit 7 istested if it is 1). The following statement resets the Z flag to 0, because bit 7 in
the destination operand is not a 1. The S flag is set to 1, and the V flag is set to 0.
TCM D4H, R0
Op Code: 64 E0 D4
Example: Register DFH contains the value FFH (11111111B). Register 07H contains the value 1FH.
Register 1FH contains the value BDH (10111101B) (bit 7, bit 5, bit 4, bit 3, bit 2, and bit 0 are tested if
they are 1), The following statement sets the Z flag to 1 indicating the tested bits in the destination operand
are 1. The S and V flags are set to 0.
TCM DFH, @07H
Op Code: 65 07 DF
Example: Working register R13 contains the value F2H (11110010B). The following statement tests bit 1
of the destination operand for 1. The Z flag is set to 1 indicating bit 1 in the destination operand was 1. The
S and V flags are set to 0.
TCM R13, #02H
Op Code: 66 ED, 02
Example: Register 5DH contains A0H. Register A0H contains 0FH (00001111B). The statement tests bit 4
of the Register A0H for 1. The Z flag is reset to 0 indicating bit 1 in the destination operand was not 1. The
S and V flags are set to 0.
TCM @5D, #10H
Op Code: 67 5D 10
Need help?
Do you have a question about the Z8 PLUS and is the answer not in the manual?
Questions and answers