Assembly--Instruction system Logic instructions

Source: Internet
Author: User

Logic directives:

Logical operation instruction and, or, not, XOR, TEST

Shift Commands SHL, SHR, SAL, SAR, ROL, ROR, RCL, RCR

Logical non-directive: not OPR; OPR cannot affect flag bit for immediate number

Logic and directives: and DST, SRC

Logic or directives: or DST, SRC

XOR /Directive : + DST, SRC

test Instruction : OPR1, OPR2

SF ZF PF is set according to the result of operation

(1) Shift instruction format: SHL opr,cnt

(1) Shift data from one register or memory unit to the left

(2) One of the last moved out is written to CF

(3) Minimum position with 0 supplement

If the number of moved bits is greater than 1 o'clock,must beWillnumber of moving bitsPut it in CL. 1) SHL logical left SHIFT instruction 2) SAL arithmetic left shift instruction
3) SHR Logical Right SHIFT command
4) SAR arithmetic right Shift commandlogical shift, moved out into the cf. The arithmetic left shift and the logical left shift are the same.
(2) cyclic shift instruction 1) ROL cyclic left shift instruction
2) ROR Loop right Shift command
3) RCL with carry Loop left Shift command
4) RCR with carry loop right-shift instruction 1) SHLD double-precision left-shift instruction SHLD Dst,reg,cnt2) SHRD double-precision right-shift instructionwith carry-on is the CF is also linked up. Each time the highest displacement into carry flag bit CFCF is set according to the instructions, the of bit is only valid when cnf=1, otherwise the bit is undefined. When Cnt=1, the highest bit changes in the shift, of=1, otherwise 0. The arithmetic shift instruction applies to the operation with the signed number, SAL Times 2, and the SAR divided by 2. The logical shift directive applies to operations with unsigned numbers.

Assembly--Instruction system Logic instructions

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.