Based on the 3rd edition of Wang Shuang Assembly language
1.1 Machine language
1. Machine language is a collection of machine instructions.
2. Machine instructions are a list of binary digits.
3.CPU (central process unit) converts machine instructions to high and low levels so that the computer's electronic devices are driven and operated.
4. Each microprocessor has its own machine language.
1.2 Production of assembly language
1. The main body of assembly language is assembly instruction.
2. The difference between the assembly instruction and the machine instruction is the representation of the instruction (writing format).
3. Assembly instructions and machine instruction one by one correspond.
4. The computer can only read machine instructions, so it is necessary to assemble the compiler to compile the source program written by the assembly instructions into machine instructions (machine code).
5. assembly language To some extent solves the problems caused by machine languages (constant reading, writing, etc.).
1.3 Composition of assembly language
1. Assembly language includes:
(1). Assembly instruction: The mnemonic of the machine code, and the machine instruction one by one corresponds.
(2). Pseudo-directive: there is no corresponding machine code, executed by the compiler, the computer does not execute.
(3). Other symbols: such as: + 、-、 *,/etc., recognized by the compiler, no corresponding machine code
2. The core of assembly language is assembly instructions.
1.4 Memory
1. Memory is what we normally say.
2. Memory in the computer is second only to the CPU.
The machine instructions and data required for the 3.cup operation are in memory.
4. The disk differs from memory, and the CPU cannot read the contents directly from the disk.
1.5 directives and data
1. Instructions and data are stored in binary form in memory or on disk.
1.6 Storage Units
1. The storage unit is numbered starting from 0.
2. A storage unit consists of 8 bits or 1 bytes.
3. The minimum unit of information for a computer is bit, and the minimum storage unit is byte.
4.1KB = 1024B, 1MB = 1024KB, 1GB = 1024MB, 1TB = 1024GB
1.7CUP read and write to memory unit
1.CPU the necessary information interaction with external devices for data read and write
(1). Address of the storage unit (address information)
(2). Device selection (Control information)
(3). Read and write data (data information)
The 2.CPU interacts with external devices via the bus.
3. Buses are divided into three categories:
(1). Address bus
(2). Data bus
(3). Control bus
1.8 Address Bus
1. The width of the address bus is the root number of the address line.
2. The width of the address bus marks the CPU's addressing capability.
3.N address bus, the CPU can find up to 2^n storage units.
1.9 Data Bus
1. The width of the data bus indicates the CPU's ability to transmit data.
2. A 8-bit binary data with a width of 8, and 16 of which can be transmitted by 16 binary data.
1.10 Control Bus
1. The width of the control bus marks the CPU's control capability.
1.11 Memory address space (Overview)
The maximum number of storage units that 1.CPU can find constitutes the memory address space.
1.12 Motherboard
1. There are many important devices on the motherboard, such as CPU, memory, peripheral chipset ...
1.13 Interface Card
1. All interface cards are connected via the bus and CPU.
2.CPU indirectly controls peripheral devices via interface cards.
1.14 Types of memory chips
1. There are multiple memory chips in a single computer.
2. From the Read and write properties, can be divided into random memory (RAM) and read-only memory (ROM).
3. The random memory must be stored on-line and the contents will be lost after shutdown.
4. Classification from functions and connections:
(1) random memory, used for storing most of the program and data, by inserting in the expansion slot and installed on the motherboard of RAM composition.
(2) ROM with BIOS, storing permanent data and programs (cannot be changed).
(3) RAM on the interface for temporary storage of data.
1.15. Memory address Space
1. Different memory is physically independent of the device.
2.CPU considers all memory as logical memory, which is the memory address space.
3. For logical memory, each memory occupies one address segment.
Compilation study notes (i)