AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Syntax:          TEQ {<cond>} {<P>} <operand1>, <operand2>
Operation:     Reflect result of operand one EOR operand two
Flags:          N,Z,(C)

This instruction is very similar to TST. The only difference is that it performs a notional EOR operation between its operands, instead of an AND. The TEQ instruction can be used to see if the bits in two data words are the same or not.

This comparison would normally be performed using CMP. However TEQ does not usually affect the carry flag, which may sometimes be useful.

Examples:
TEQ  R1,#5          ; Test to see if R1 contains 5
TEQ  R3,R4          ; Test to see if R3 = R4

Like CMP and CMN,this is another instruction where the S suffix is implied.
The C flag is set to the carry output bit generated by the shifter.

[sh-index] Back to list of manuals