"In-depth understanding of computer systems" 3.3 data formats, 3.4 access information

Source: Internet
Author: User

Data format Word Intel uses theWord(word) to indicate that the 16-bit data type 32-bit data type isDouble Word(double words) the 64-bit data type isFour words(quad words)
There are a lot of instructions in the assembly with a conceited suffix that represents the size of the operand, such as the number of transfer instructions: MOVB (transfer byte) MOVW (transfer word) MOVL (double word transfer)


NoteThe suffix of the floating-point type is also L, but the floating-point number is run with another register, which does not produce ambiguity
For example, MOVL integer operation Register, integer operation register MOVL floating-point arithmetic register, floating-point arithmetic register

Access information
8 Integer RegistersThe first 6 can be thought of as universal registers, and the last 2 hold pointers to important positions in the program stack.


operand instruction
General data is taken from memory to register and saved to memory after calculation
Most directives have one or more operands such as: mov operand 1, operand 2 moves data of operand 1 to operand 2 operand 1 is data source, operand 2 is destination address

The type of operand immediately//is a constant value register//data (get/Save) to register memory//IS memory,data (get/Save) to register
Operand format






Data Transfer Instructions


The MOV instruction source operand can be an immediate number, register, memory destination operand can be register, memory address LimitTwo operands cannot all point to the memory location



Stack


The address of the stack is to increase the attention!!!! Here, the bottom picture is on top.
Executes the PUSHL instruction to push the data in the%eax into the stack, the stack refers to the pointer automatically moves to the low address the process is equivalent to Subl $4,%esp movl%eax, (%ESP) move the stack pointer before saving the data


Save the data to%edx, then move the stack pointer equivalent to MOVL (%ESP),%edxaddl $4,%esp
Exercises




"In-depth understanding of computer systems" 3.3 data formats, 3.4 access information

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.