Logic instruction of the "assembly instruction" Data processing instruction

Source: Internet
Author: User
Tags processing instruction

The logical instruction set is: And/orr/eor/bic

1) With logic commands are generally used to place 0 bits: and

and

Logical and operation.

Syntax And{cond}{s} Rd, Rn, OP2
Description Load Rd with logical AND of Rn with OP2. Rd: = Rn and OP2
Condition Flags If S is specified, N, Z the flags are updated. C flag May is updated by calculation of OP2.
Example
         and R9,R2, #0xFF00     //Load R9 with R2 and value in 0XFF00



2) logic or instruction: ORR (or logic generally used for a bit of 1)

ORR

Logical OR operation.

Syntax Orr{cond}{s} Rd, Rn, OP2
Description OR operations on the values in Rn and OP2.
Condition Flags If S is specified, N, Z the flags are updated. C flag May is updated by calculation of OP2.
Example
      ORR     R2, R0, R5    //Rd = R0 or R5




3) comparison instruction: Cmp/cmn/tst/teq




Logic instruction of the "assembly instruction" Data processing instruction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.