"Csapp reading Note 3" x86 Assembly Language

Source: Internet
Author: User

This part actually has no good notes ... After all, it's the same as the x86 compilation on the textbook.

But there's a need to pay attention. x86 compilation has two forms of writing: Intel format and T format (Csapp Page200)

Intel format: is common in documentation for Microsoft and Intel. In addition, Chinese textbooks also use this format

That's what Format:csapp is used for. In addition, GCC, objdump and other tools to decompile the code is also the default format

The main difference is that the position of source and destination in the operand is reversed.

and AT/T format register in front to add%, immediately before the number of plus $, memory address with (), 16 binary number in the form of 0xABCDEF.

Give me a chestnut:

MOV ebp,esp//intel format mov%esp,%ebp//at&t format

Pop ebp Pop%EBP

MOV edx,[ebp+8] mov 8 (%EBP),%edx

There is also a small place: the domestic Textbook assembly language uses the 16-bit 8086 CPU,

In a more modern 32-bit CPU, the register is the same, and the only change is the number of bits added to 32 bits.

In IA32 assembly language, the register name is preceded by an e that is 32bit register.

(Csapp Page 202)

"Csapp reading Note 3" x86 Assembly Language

Related Article

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.