Home > Common Problem > What are the two translation methods for translating high-level language source programs into machine instructions?

What are the two translation methods for translating high-level language source programs into machine instructions?

藏色散人
Release: 2023-01-13 00:38:50
Original
27583 people have browsed it

There are two translation methods for translating high-level language source programs into machine instructions: compilation and parsing; the interpretation method is to interpret and execute the source program sentence by sentence, while the compilation method is to translate the entire source program written in a high-level language It is first translated into a machine language program and then generated as an executable program that can be run directly under the operating system, usually resulting in a target program.

What are the two translation methods for translating high-level language source programs into machine instructions?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

What are the two translation methods for translating high-level language source programs into machine instructions?

Compilation and parsing.

Translate programs written in high-level languages ​​into machine language programs, using two translation methods: compilation and interpretation. The interpretation mode is to interpret and execute the source program sentence by sentence, that is, interpret one sentence and execute it, so no object file is generated in the interpretation mode. For example, the early BASIC language used the "interpretation" method. The compilation method is to first translate the entire source program written in a high-level language into a machine language program, and then generate an execution program that can be run directly under the operating system, usually resulting in a target program.

What are the two translation methods for translating high-level language source programs into machine instructions?

Extended information:

High-level programming language (High-level programming language) is an instruction set system relative to machine language (machine language). This This instruction set, called machine code, is data that can be directly interpreted by the computer's CPU). It is a highly encapsulated programming language, as opposed to a low-level language. It is a programming language based on human daily language. It is expressed in words that are easy for ordinary people to accept (such as Chinese characters, irregular English or other foreign languages), making it easier for programmers to write and with higher reliability. It is readable so that people with little knowledge of computers can roughly understand its contents. Since the development of the early computer industry was mainly in the United States, most high-level languages ​​​​are based on English. In the 1980s, when computers began to be used in East Asia, attempts were made to develop high-level languages ​​written in their respective local languages ​​in Japan, Taiwan, and China. These were mainly adaptations of BASIC or languages ​​specifically designed for database data access. However, as There is currently very little development related to improving programmers’ foreign language skills.

Because assembly language depends on the hardware system and the mnemonics are large and difficult to remember, people have invented so-called high-level languages ​​that are easier to use. In this language, its syntax and structure are more similar to Chinese characters or ordinary English, and because it is far away from direct operation of the hardware, ordinary people can program after learning. High-level languages ​​are usually classified according to their basic types, generations, implementation methods, application scope, etc.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What are the two translation methods for translating high-level language source programs into machine instructions?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template