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