Chapter III Machine-level representation of the program
First, processor history-Moore's Law
Moore's law was proposed by Gordon Moore, one of Intel's founders, Gordon Moore.
The contents are as follows: When the price is constant, the number of components that can be accommodated on the integrated circuit will increase by one times every 18-24 months, and the performance will be increased by one times. In other words, the computer performance that every dollar can buy will be at every 18-24
More than twice a month. This law reveals the speed with which information technology advances.
Second, the program code
Linux default compiler--GCC C compiler
Process:
Suffix name Explanation:
GCC Common options:
Third, the data format
char-bytes-B
short-Word-W
int-Double word-l
Long int-double word-l
Long Long int-/-/
char*-Double word-l
float-Single precision-s
double-Double Precision-L
Long double-extended precision-t
Four, the way of addressing
Immediate addressing, register addressing, direct addressing, inter-register indirect addressing, register relative addressing (or direct address addressing), base address addressing, relative base address addressing
, proportional addressing mode, base address proportional address mode, and relative base address proportional addressing mode
V. directives
mov--transmitting data
add--Plus
sub--minus
imul--Multiply (signed)
xor--XOR
or--or
and--and
leal--delivery address
inc--Plus One
dec--minus One
neg--take negative?
not--to take the supplement?
Sal (SHL)--shift left
sar--Arithmetic Right Shift
shr--Logical Right Shift
loop--Cycle
Jump instruction: Slightly
Six, the flag bit
Common Conditional flag bits:
CF: Carry Flag
ZF: 0 Logo
SF: Symbol Sign
Of: Overflow flag
The corresponding position of the flag bit:
Vii. Use of
call--Call
ret--return (equivalent to the return of the C language)
Eight, the experiment
Experiment Code:
Assembly Original Code:
Remove the assembly code with the. Line of code:
Problems encountered:
1. There is some discrepancy between the assembly instruction and last semester's study ...
For example: The book neg is to take the negative instruction, not is the take-up instruction, but the compilation book on Neg is to take the supplementary instruction, not is to take the counter-instruction.
2. When using GDB's Bt/frame/up/down instruction, I do not know why the "no stack" is always displayed.
Information Security System design basics 5th Week study notes