UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
183
Examples
•
If Working Register R3 contains the value
45H
(01000101B) and Working Register
R7 contains the value
01H
(00000001B) (testing bit 0 if it is 1), the statement:
TCM R3, R7
Object Code: 62 37
sets the Z flag indicating bit 0 in the destination operand is 1 and clears the V and S
flags
•
If Working Register R14 contains the value
F3H
(11110011B), Working Register R5
contains the value
CBH
, and Register CBH contains the value
88H
(10001000B)
(testing bits 7 and 3 if they are 1), the statement:
TCM R14, @R5
Object Code: 63 E5
resets the Z flag (because bit 3 in the destination operand is not a 1) and clears the V
and S flags.
•
If Register D4H contains the value
04H
(00000100B), and Working Register R0
contains the value
80H
(10000000B) (testing bit 7 it is 1), the statement:
TCM D4H, R0
Object Code: 64 E0 D4
resets the Z flag (because bit 7 in the destination operand is not a 1), sets the S flag and
clears the V flag.
•
If Register DFH contains the value
FFH
(11111111B), Register 07H contains the value
1FH
, and Register 1FH contains the value
BDH
(10111101B) (testing bits 7, 5, 4, 3, 2,
and bit 0 if they are 1), the statement:
TCM DFH, @07H
Object Code: 65 07 DF
sets the Z flag (indicating the tested bits in the destination operand are 1) and clears
the S and V flags.
•
If Working Register R13 contains the value
F2H
(11110010B), the statement:
TCM R13, #02H
Object Code: 66 ED, 02
tests bit 1 of the destination operand for 1, sets the Z flag (indicating bit 1 in the
destination operand was 1) and clears the S and V flags.
•
If Register 5DH contains the value
A0H
, and Register A0H contains the value
0FH
(00001111B), the statement:
TCM @5D, #10H
Object Code: 67 5D 10