Program encoding on UNIX machines using commands
Compiling code
The higher the level of the optimized compilation, the longer the compilation time, the higher the program performance
Machine-level code for machine-level programming, two abstractions are particularly important for the first machine-level program
format and behavior (ISA
instruction set architecture)The memory address used by the second machine-level program is the virtual address machine-level code that sees memory as a chunk of the array.
Assembler code case specific code action is only later in the chapter
After learning the register and the stack after the drawing, some parts of the book did not say the whole, searched a lot of information, perhaps these parts are back to the chapter after the relevant information link http://www.cnblogs.com/jiu0821/p/4504917.html Gives a very detailed compilation of a function and its interpretation
Where the CPU mainly contains the following objectsProgram Counter(PC): Record the address of the next instruction.Integer RegisterFiles: A total of 8, you can store some address or integer data.Condition Register: Saving the state information of arithmetic or logic instruction can realize the process control of the program.floating-point registers: Stores floating-point numbers.
Program Memory: Contains the program executable machine code, the operating system needs some information, the operating system is responsible for managing the virtual address space, translating the virtual address into the physical address of the actual processor memory
ATT differs from the Intel Assembler code style
ATT
Intel
- Intel omitted to indicate the size of the suffix, MOV, rather than MOVL
- Intel omits the%,ESP in front of the register name instead of the%ESP
- Intel describes the location of the memory in different ways, "DWORD PTR [ebp+8]" instead of 8 (%EBP)
"In-depth understanding of computer system" 3.2 program code