The assembly language level differs in a significant respect from the micro architecture, ISA, and operating system machine levels- it is implemented by translators rather than by interpretation.
Translator: Program that convert a user's program written in some language to another language are called translator.
Source Language: The language in which the original program is written is called the source language.
Target Language: The language to which it is converted is called the target language.
- Difference between translation and interpretation
- Generation of an equivalent program in the target language
- Execution of newly generated language
"When the source language is essentially a symbolic representation for a numerical machine language, the translator is called an assembler and the source language is called an assembly language. "
Assembly Language:
- each statement produces exactly one machine instruction
- much easier code than in machine language
- combination of symbolic names and symbolic addresses
- It has access to all the features and instruction available on the target machine
- an assembly language program can run only one family of machines
Macros:
- A macro definition is a way to give name to a piece of text. After a macro has been defined, the programmer can write the macro name instead of the piece of program
SWAP MACRO
MOV EAX,P
MOV EBX,B
MOV Q,EAX
MOV P,EBX
ENDM
SWAP
SWAP
Courtesy: Andrew S. Tanenbaum, Structured Computer Organization (Fifth Edition)