search
HomeCommon ProblemThe instructions in the application can be divided into requesting specific services from the operating system and what?

Theoretically, the instructions in an application can be divided into instruction sets that are used to request specific services from the operating system and the central processing unit (CPU). The processing flow of CPU operation instructions is roughly divided into several steps: instruction fetch, decoding, execution, memory access, write back, etc.; each instruction requires 1 to 6 bytes, depending on which fields are required.

The instructions in the application can be divided into requesting specific services from the operating system and what?

#The operating environment of this article: windows10 system, thinkpad t480 computer.

Theoretically, the instructions in the application can be divided into two categories: the instruction set of the central processing unit (CPU) and the one used to request specific services from the operating system.

Central Processing Unit (CPU, Central Processing Unit) is a very large-scale integrated circuit and is the computing core (Core) and control core (Control Unit) of a computer. Its function is mainly to interpret computer instructions and process data in computer software.

The central processing unit mainly includes the arithmetic unit (arithmetic logic unit, ALU, Arithmetic Logic Unit) and the cache memory (Cache) and the bus (Data), control and status that realizes the connection between them. Bus). It, together with internal memory (Memory) and input/output (I/O) devices, are collectively known as the three core components of electronic computers.

The processing flow of CPU operation instructions is roughly divided into several steps: instruction fetch, decoding, execution, memory access, write back, etc. Each instruction requires anywhere from 1 to 6 bytes, depending on which fields are required. The first byte of each instruction indicates the type of instruction: the high 4 bits are the code part (for example: 6 is an integer operation instruction), and the low 4 bits are the function part (for example: 1 is a subtraction instruction in the integer class) 61 Together they are the sub command.

Processing instruction flow

An important property of the instruction set is that the byte encoding must have a unique interpretation. Any sequence of bytes either encodes a unique instruction sequence or is not a valid sequence of bytes. Because the first byte of each instruction has a unique combination of code and function, given this byte, we can determine the length and meaning of all other additional bytes.

Each instruction requires 1 to 6 bytes, depending on which fields are required. The first byte of each instruction indicates the type of instruction: the high 4 bits are the code part (for example: 6 is an integer operation instruction), and the low 4 bits are the function part (for example: 1 is a subtraction instruction in the integer class) 61 Together they are the sub command.

The following is the flow chart for processing each instruction:

The instructions in the application can be divided into requesting specific services from the operating system and what?

fetch

get value The stage reads the instruction byte from the memory and places it in the instruction memory (in the CPU), and the address is the value of the program counter (PC). It calculates the address of the next instruction following the current instruction in a sequential manner (that is, the value of the PC plus the length of the fetched instruction).

Decoding (decode)

The ALU reads up to two operands from the register file (a collection of general-purpose registers). (That is, the contents of two registers can be read at most at one time)

Execution(execute)

In the execution phase, the arithmetic/logical unit ( ALU) are used for different purposes. For other instructions, it will act as an adder to calculate increment or decrement the stack pointer, or calculate the effective address, or simply add 0, passing an input to the output.

The condition code register (CC) has three condition bits. The ALU is responsible for calculating the new value of the condition code. When a jump instruction is executed, the branch signal cnd is calculated based on the condition code and jump type.

Memory access (memory)

In the memory access phase, the data memory (in the CPU) reads or writes a memory word. Instruction and data memory access the same memory locations, but for different purposes.

Write back(write back)

The write back phase can write up to two results to the register file. The register file has two write ports. Port E is used to write the value calculated by the ALU, while port M is used to write the value read from the data memory.

Update PC(PC update)

According to the instruction code and branch flag, select the next PC value from the signal values ​​obtained in the previous steps.

The above is the detailed content of The instructions in the application can be divided into requesting specific services from the operating system and what?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.