AT&T assembly and GCC integrated assembly, x86 assembly, and vc Embedded Assembly

Source: Internet
Author: User

Differences between AT&T assembly and intel assembly:
1. AT&T has a more complex way of writing instant numbers, variables ($), and registers (%. Intel directly uses it.
2. the Source and Destination operands of AT&T are opposite to those of intel.
3. Addressing AT&T uses the segment address: (offset, base address, factor) while inel directly uses the segment address: [base address * factor + offset]
4. The Code identifies AT&T as. text and intel as. coder.

Differences between gcc embedded assembly and VC Embedded Assembly:
1. gcc embedded assembly is AT&T, and vc Embedded Assembly is in intel format.
2. The compilation keyword in gcc is asm and in vc is _ asm (also supports asm)
3. The Assembly in gcc needs to name the input and output variables. The variable embedded in the Assembly in vc directly uses the variable in the c/c ++ statement.
4. The Assembly statement in gcc needs to be separated by semicolons or/n/t, which can be written in a row, while the line feed is required in vc.

Now, I know this. I hope you can give me some advice.

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.