What are machine-oriented languages?

Machine language principle

The core component of the computer is the CPU (Central Processing Unit), which is an integrated circuit with many pins. All the computer's actions are ultimately generated by its internal "electronic calculations." From an understanding point of view, the CPU can be regarded as a set of "conventions". When we tell it "1", "add", "2", "compute", "output" and other signals through some pins, the "convention" fixed by the CPU design is made on other pins. A signal of "3" is output and the display device is notified that "3" is displayed, and we have obtained the result. - These "contracts" are the machine language of the CPU.

Different CPUs have different machine languages. Software based on different machine languages ​​cannot be used universally. A vendor's new CPU tends to remain compatible with its earlier CPU for the sake of software versatility. Machine language is the basis of all software (including operating systems) and is the instruction that the computer ultimately recognizes and executes.

Any machine language accepts only two types of information: "instructions" and "data"; instructions are what tells the CPU what to do, and data is the object of the action. For example, "plus" and "operation" in the above are instructions, and "1" and "2" are data. In terms of form, instructions and data are binary information. However, if the data is handled as instructions to the CPU, the CPU will usually fail to understand and crash. If the instruction is treated as data to the CPU, it will not cause any harm, because the data will not cause any CPU action.

To verify this statement, you can easily change the extension of a file to COM in DOS. You can also change the extension of the command processor COMMAND.COM to TXT to open with Notepad (remember not to save! ).

Machine-oriented language overview

Machine-oriented languages ​​are programming languages ​​designed for a specific computer or type of computer. This language retains the appearance of the machine language, that is, the shape of the instruction is composed of opcodes and address codes, but the machine-language-oriented language is in the form of symbols instead of machine codes. This language allows users to get rid of some of the pure details of the computer (such as the need to hard-code the machine instruction code, get rid of the binary conversion problem and allocate memory problems, etc.) and concentrate on the internal connections between programs. The representative of such languages ​​is assembly language.

What are machine-oriented languages?

What are the machine-oriented languages 1, the machine language

A machine language program is composed of machine instructions. The machine instructions are arranged in order of execution, and a specific calculation or task is executed in sequence at runtime.

Machine instructions are instructions that the CPU can directly recognize and execute. The machine instructions are represented by several bits of the physical component in binary states 0 and 1. The machine instruction program needs to be stored in memory before running. Once the correct machine instruction is sent to the CPU, it will become an action to be executed.

As shown in Figure 1-1, machine instructions are machine-oriented and vary from machine to machine. Different machines have different machine instructions and thus have different machine languages. Different machines refer to computers that have different CPUs (Central Processing Units). Because the machine instructions are closely related to the CPU, the machine instructions corresponding to different types of CPUs are also different, and their instruction systems often differ greatly. However, for the same series of CPUs, in order to meet the good compatibility between various models, designers generally have to do: The instruction system of the new-generation CPU must be compatible with the previously developed instruction system of the same series of CPUs. Only in this way, the various programs developed previously can operate normally on the new CPU.

What are machine-oriented languages?

Machine instructions are usually composed of two parts: the operation code and the operand. The operation code indicates the operation to be completed by the instruction, that is, the function of the instruction, the operation number indicates the object involved in the operation, and the position where the operation result is stored. Since machine instructions are represented by several bits of a physical 0,1 state, the most direct memory form of a machine instruction is a binary number representing the state of the instruction. This binary number is referred to as the binary code instruction of the machine instruction. Because of the special relationship between binary numbers and octal numbers, as well as hexadecimal numbers, the octal and hexadecimal numbers corresponding to the binary code instructions are called octal or hexadecimal code instructions of the machine instructions, respectively.

For example: B233H is an 80*86 hexadecimal machine code instruction. The function of this instruction is to send the 33H hexadecimal number to the DL register. The binary code instruction of this machine instruction is 16 bits in length.

Obviously, the binary code instructions correspond to their states intuitively, but the memory is difficult. The hexadecimal code instructions are easy to remember. So 80*86 code instructions are usually expressed in hexadecimal.

A program written by a machine instruction is called a machine instruction program, and a machine instruction program is also a program written by a code instruction. The machine instruction program follows the von Neumann principle: the numbers are expressed in binary, the program and the data are stored in the same memory, and the program instructions are generally executed in the order of access.

In the early days of the computer, there was only one machine language. Programmers could only use code instructions to write programs, ie machine language programs. Writing programs in machine language is a very difficult task and must be undertaken by highly trained professional technicians. This is one of the biggest obstacles to why computers were not widely used in the early days.

On the one hand, machine language is very important and must be understood. On the other hand, the use of machine code instruction programs is very difficult. Therefore, the only assembly language that can replace machine language becomes a computer language that computer scientists must master.

2, assembly language

Although there are many inconveniences in writing a program in machine language, the program execution efficiency is high. Therefore, under the premise of keeping the “high program execution efficiency”, people started to study a programming method that can greatly improve the readability of the program. That is, the word or phrase that reflects the function of the machine instruction is used instead of the operation code of the machine instruction, and the corresponding symbol is used to represent the CPU internal resources and memory and other operands. This is the assembly instruction.

For example, assembly instructions:

MOVAL, BL its corresponding binary instruction, hexadecimal code instruction is D888H, visible memory machine instruction is quite difficult.

In the assembly instruction, the MOV is derived from Move, indicating the transfer instruction; AL and BL represent the 80x86 AL and BL registers, respectively. The instruction function is to transfer the contents of the BL register to the AL register. In this way, confusing binary machine code instructions or hexadecimal machine code instructions can be represented by easy-to-understand, meaningful symbolic instructions. This is the original purpose of assembly instructions. We call these symbols with certain meanings, such as MOVs in the above instructions, as mnemonics. The symbol instructions made up of mnemonics, symbol addresses, etc. are called assembly format instructions or assembly instructions.

Therefore, machine instructions represented by mnemonics are called assembly instructions, and programs written by assembly instructions are called assembly instruction programs. However, assembly instructions must ultimately be translated into machine instructions to be executed on a computer.

Assembly language is the collective name for the assembly instruction set, the set of directives, and their usage rules. Such machine instructions, represented by mnemonics that can be translated one by one into machine instructions, are called assembly instructions. The pseudo-instruction is an auxiliary description appearing in the assembly language program. It does not correspond to a specific machine instruction, but is a translation program (ie, assembly), a connection program, and how to install the program during the process of the designer and the assembly process. Into an agreement.

A program written in assembly language is called an assembly language program or an assembly language source program, also referred to simply as a source program. Assembly language programs are easier to understand and maintain than machine instruction programs.

An assembly language source program is a text file that must be translated to be an executable machine language program. This translation process is called assembly. The core process of assembly is to translate assembly instructions one by one into machine instructions. This is the meaning of the word “Assembly” in assembly language.

80x86 assembly language source program extension. Asm, the floating-point binary file extension generated after assembly. Obj,. Obj files need to be connected to be able to generate executable files. Exe. . The exe is a machine instruction program that can be executed by the operating system. Figure 1-2 shows the correspondence between a simple assembly language program and its machine instruction program.

Although different CPUs have different assembly languages, different kinds of assembly languages ​​have their common rules. Therefore, it is relatively easy to learn an assembly language and then learn other assembly languages.

Machine language development

Each type of computer has its own unique machine instructions. For example, a certain type of computer uses 8-bit binary information 10001010 for addition instructions, 00010011 for subtraction instructions, and so on. Execution of these instructions is ensured by the computer's wiring. At the beginning of the design of the computer, it is necessary to determine the line logic operation corresponding to each instruction. The early language of computer processing of information is the so-called machine language. Programming using machine language requires the machine to write code, that is, it needs to write instruction sequences such as 01011100 for different machines. Programming in machine language is a tiring job, and the code is difficult to read and understand. A simple task often entails writing a lot of code, and the same task needs to be written separately for different types of computers, because a A model computer uses the 10001010 to represent add instructions, while another model computer may use 11110000 to represent add instructions. Therefore, using machine language programming is also called machine-oriented programming. Assembly languages ​​emerged in the 1950s. When writing instructions, instead of binary instructions, simple, easy-to-remember symbols were used. However, assembly language is still machine-oriented, and different code needs to be written for smaller machines. It is customary to refer to machine language and assembly language as low-level languages.

Portable Power

With 15+ years manufacturing experience for portable power.

Supply various portable charger for iPhone, Airpods, laptop, radio-controlled aircraft ,laptop, car and medical device mobile device, ect.


From the original ordinary portable power source to Wireless Power Bank, Green Energy Solar Power Bank, Magnetic Mobile Power, Portable Power Stations and other products continue to innovate.

Avoiding your devices run out of charge, Portable Chargers to keep your mobile device going.

We help 200+ customers create a custom mobile power bank design for various industries.


Portable Power Supply, Wholesale Powerbank,Portable Phone Charger,wholesale gifts

TOPNOTCH INTERNATIONAL GROUP LIMITED , https://www.itopnoobluetoothes.com