When a computer chip is running, it reads the instruction code (one or more bytes, indicating that the processor completes a task) stored in the memory, and the data required for the instruction code is also read from the memory.
Use a pointer to distinguish data from a script.
Instruction Pointer is used to help the processor understand which instruction codes have been processed and then what to process, including instructions that change the position of the instruction pointer.
The Data Pointer helps the processor understand the starting position of the data area (stack) in the memory. The data enters, And the pointer "moves down ".
The instruction code contains the error message segment, which specifies the operations to be performed by the processor.
Each instruction must contain at least one byte of operation code. (Processor predefined)
Script format:
1. optional command prefix;
2. Operation Code
3. Optional Modifier
4. optional data elements
Registers are components in the processor chip used to temporarily store the data being processed by the processor.
Command Prefix:
1. Lock prefix (indicating that the command will use the shared memory area separately) and duplicate prefix (repeated, often processing strings );
2. segment overwrite prefix (which can overwrite the instructions of the defined segment register) and branch prompt prefix (attempts to provide the processor with clues about the most likely path in case of conditional jump );
3. The length of the operand overwrites the prefix (the notification processor will switch the length of the 16-bit and 32-bit operands in this operation code .);
4. Address length overwrite the prefix (the notification processor will switch the 16-bit and 32-bit memory addresses, and the program will switch to another length );
Modifier:
Help the operation code to define the registers and memory locations involved in the execution function:
1. Description of addressing mode (modr/m) bytes
2. Proportional-index-base address (SIB) bytes
3.1, 2, or 4 address shifted bytes
Data element:
Some script codes read data from memory locations or in a short time. Some script codes include data in the memory.
Ia32 adopts a small byte order. For example, 1 is written to 4 bytes in hexadecimal format: 01 00 00 00 (the low position first appears );
Hll (advanced language) classification:
1. compilation language
2. explanation language
Procedure:
1. Compile the Hll statement into the original script code;
2. Connect the original script code to generate an executable program;
Assembly language definition variables:
1. Mark pointing to a memory location
2. Data Types and default values of memory bytes
Stack is a special memory area. It is retained to transfer data elements between functions in the program. It can also be stored and retrieved by Jeremy Lin. Data Element. (It is the memory area reserved by the computer for the end of the memory range reserved by the application .)
The stack pointer is used to point to the next memory location in the stack for data insertion and removal.
At least the following paragraphs must be declared in the assembly language:
1. Data Segment (declared as the memory area where the program stores data elements. Static)
2. BSS segment (static memory segment, which contains the buffer for future data declared in the program. Fill in with 0 .)
3. Text segments (fixed areas for storing assembly language instructions in memory .)