Hardware Reference
In-Depth Information
7
THE ASSEMBLY LANGUAGE LEVEL
In Chapters 4, 5, and 6 we discussed three different levels present on most con-
temporary computers. This chapter is concerned primarily with another level that
is present on all computers: the assembly language level. The assembly language
level differs in a significant respect from the microarchitecture, ISA, and operating
system machine levels—it is implemented by translation rather than by interpreta-
tion.
Programs that convert a user's program written in some language to another
language are called translators . The language in which the original program is
written is called the source language and the language to which it is converted is
called the target language . Both the source language and the target language
define levels. If a processor that can directly execute programs written in the
source language is available, there is no need to translate the source program into
the target language.
Translation is used when a processor (either hardware or an interpreter) is
available for the target language but not for the source language. If the translation
has been performed correctly, running the translated program will give precisely
the same results as the execution of the source program would have given had a
processor for it been available. Consequently, it is possible to implement a new
level for which there is no processor by first translating programs written for that
level to a target level and then executing the resulting target-level programs.
It is important to note the difference between translation, on the one hand, and
interpretation, on the other hand. In translation, the original program in the source
517
 
 
Search WWH ::




Custom Search