Instructions control the operation of machine code during program execution and are the basis for CPU execution, making programming, compiling, and execution effective.Pseudo instructions do not directly control the runtime machine but guide the translation program on how to generate machine instruction code. |
Instruction Statements
Each instruction statement generates executable instruction code (i.e., target code) during the assembly of the source program, which is why this type of statement is also called an executable statement. Each instruction statement represents a basic capability of the computer, such as data transfer, addition or subtraction of two numbers, shifting, etc., and this capability is completed during the execution of the target program (an ordered collection of instruction codes), relying on hardware devices such as the Central Processing Unit (CPU), memory, and I/O interfaces.
Pseudo Instruction Statements
Pseudo instruction statements are used to instruct the assembler on how to assemble the source program, which is why this type of statement is also called a command statement. For instance, pseudo instruction statements in the source program tell the assembler how to segment the source program, what logical segments are in the program segment, which is the current segment, and which segment registers point to them; they define what data is available and how storage units are allocated, etc. Aside from the specific data defined that needs to generate target code, other aspects do not have corresponding target code. The command functions of pseudo instruction statements are completed by the assembler executing a program during the assembly of the source program, rather than during the execution of the target program. Pseudo instructions do not have corresponding machine code; unlike instructions executed by the CPU, they are processed by the MASM assembler during the assembly of the source program. The distinction between instructions and pseudo instructions may seem simple, but I did not understand it at first, so I am making this note.
Instructions:
Each instruction statement generates executable instruction code (i.e., target code) during the assembly of the source program, which is why this type of statement is also called an executable statement. Each instruction statement represents a basic capability of the CPU, such as data transfer, addition or subtraction of two numbers, shifting, etc., and this capability is completed during the execution of the target program, relying on CPU, memory, and I/O interface devices.
Pseudo Instructions:
As the name implies, they are not real instructions, meaning they are not final instructions; they are used to instruct the assembler on how to assemble the source program, which is why this type of statement is also called command statements. For example, pseudo instructions tell the assembler how to segment the source program, what logical segments are in the program segment, which is the current segment, etc. The command functions of pseudo instruction statements are completed by the assembler executing another program during the assembly of the source program, rather than during the execution of the target program. So why have pseudo instructions instead of using only instructions? The reason is to achieve more advanced functionalities.
Summary:
Instructions control the operation of machine code during program execution and are the basis for CPU execution, making programming, compiling, and execution effective. Pseudo instructions do not directly control the runtime machine but guide the translation program on how to generate machine instruction code, serving only the compilation process; once compilation is complete, the role of pseudo instructions disappears. The above is an introduction to the difference between assembly language pseudo instructions and assembly instructions, which I hope is helpful to everyone.
Original text from:https://www.jb51.net/article/178908.htm Article address:https://www.linuxprobe.com/assembly-language-thedifference.html Editor:坑 人 小 妖 精, Reviewer:逄增宝 Linux Command Collection:https://www.linuxcool.com/
Official Site:www.linuxprobe.com
Linux Command Collection:www.linuxcool.com
Linux System Download Site:www.linuxdown.com
Teacher Liu Chuan QQ:5604922
Linux Technical Exchange Group: 193666693
(New group, actively adding members…)
Online learning materials (best viewed on computer):
http://www.linuxprobe.com/chapter-00.html
Readers who want to learn the Linux system can click the “Read Original” button to learn about the book “Linux Should Be Learned This Way”, which is also very suitable for professional operations and maintenance personnel to read, becoming a high-value tool book to assist you in your work!