📜  汇编器和解释器的区别

📅  最后修改于: 2021-09-14 02:05:15             🧑  作者: Mango

1. 装配工:
一种汇编语言,基本上是助记符,如 GO、HALT、JUMP 和 NOT 代码,由编程语言翻译器(即Assembler )翻译成机器语言。汇编程序是以汇编语言为源代码,将其转换为计算机可以理解的位格式即机器语言的程序。例如 NASM 和 MASM。

2. 翻译:
解释器是一种将高级语言转换为位格式即机器语言的程序。解释器和编译器的函数相同,但解释器一次翻译一行并执行它。没有生成目标代码,因此每次必须运行程序时,首先要对其进行解释。

汇编器和解释器的区别:

S.No. Assembler Interpreter
1. It converts low-level language to the machine language. It converts high-level language to the machine language.
2. The program for an Assembler is written for particular hardware. The program for an Interpreter is written for particular language.
3. It is one to one i.e. one instruction translates to only one instruction. It is one to many i.e. one instruction translates to many instruction.
4. It translates entire program before running. It translates program instructions line by line.
5. Errors are displayed before program is running. Errors are displayed for the every interpreted instruction (if any).
6. It is used only one time to create an executable file. It is used everytime when the program is running.
7. Requirement of memory is less. Requirement of memory is more.
8. Programming language that it convert is Assembly language. Programming language that it convert are PHP, Python, Perl, Ruby.