TST
|
Logical test
|
TST
|
TeST logical
|
[Syntax]
TST src, src2
[Operation]
src2 & src;
[Function]
- | This instruction changes the flag states in the PSW according to the result of logical AND of src2 and src. |
[Instruction Format]
|
|
|
|
|
|
TST src, src2
|
|
#SIMM:8
|
Rs
|
|
|
#SIMM:16
|
Rs
|
|
|
#SIMM:24
|
Rs
|
|
|
#IMM:32
|
Rs
|
|
|
Rs
|
Rs2
|
|
|
[Rs].memex
|
Rs2
|
|
|
dsp:8[Rs].memex
|
Rs2
|
|
|
dsp:16[Rs].memex
|
Rs2
|
|
[Flag Change]
Conditions
Z : The flag is set if the result of the operation is 0; otherwise it is cleared.
O : The flag is set if the MSB of the result of the operation is 1; otherwise it is cleared.
[Description Example]
TST #7, R2
TST R1, R2
TST [R1], R2
TST 1[R1].UB, R2