Answer the question
In order to leave comments, you need to log in
Multilevel computer organization. Is the written code interpreted/translated until it reaches machine code?
Read Tanenbaum "Computer Architecture". It is written that the computer consists of "levels".
The invention of a whole series of languages, each more human-friendly
than the last, may continue until we arrive at
a language that suits us. Each such language uses its predecessor
as a basis, so we can think of the computer as a series of layers,
shown in Fig. 1.1. The language at the very bottom of the hierarchical
structure is the most primitive, and the language at the top is the most
complex.
Answer the question
In order to leave comments, you need to log in
Well kakbe languages are divided into interpreted and compiled.
The latter are immediately compiled into (almost) machine code and stored in this form. There "transmission" is minimal.
The first in its most primitive form, yes - it is "broadcast" every time to the very bottom. But the modern interpreters of most of these languages are rather fat monsters that "prepare" a lot of things and use a lot of brain-bending tricks to speed up.
Well, if we talk about "chains of languages" - of course, there is (almost) no such thing.
A maximum of one intermediate level is added for cross-platform, e.g. in the same Java.
When I was a student, we had a course on "translation methods". As a practical part, a subset of a high-level language (C or Pascal) was taken and translated into assembly language.
"Combat" translators may also use assembly language as the only intermediate language, or they may not use anything intermediate.
Also quoting from Wikipedia:
Interpreted languages that use bytecode include Perl, PHP (such as Zend Engine), Ruby (since version 1.9), Python, Erlang, and many others.from here: https://ru.wikipedia.org/wiki/Bytecode
Common platforms using bytecode[9]:
Java bytecode (stack virtual machine) executed by various Java virtual machines[10][11]. The platform was created by Sun for the Java language, but has been used for other languages as well; there are dozens of high performance JVM implementations using JIT compilers.
There are options for translating Java into register machine bytecode, for example, in the Dalvik virtual machine (with JIT compilation) or when AOT compilation in ART
The Microsoft .NET platform uses the Intermediate Language (CIL, MSIL)[8] bytecode stack, which is executed by the Common Language Runtime (CLR), created by Microsoft for C# and several other languages.
The JavaScript scripting language is executed by various high-performance "engines", mostly built into web browsers, often with JIT optimization capabilities. Many interpreters are built using bytecode, but Javascript programs are distributed as source codes.
The ActionScript scripting language is translated into stack bytecode, distributed as swf and pdf files, and executed by virtual machines in Adobe Flash and Adobe Acrobat.
The Clipper compiler creates an executable file that includes the bytecode translated from the program's source code and a virtual machine that executes this bytecode.
Java programs are usually compiled into class files containing Java bytecode. These generic files are transferred to various target machines.
Early implementations of Visual Basic (before version 6) used high-level Microsoft p-code[9]
High-level p-codes and byte codes were used in DBMS, some implementations of BASIC and Pascal.
In Sun Microsystems' Open Firmware standard, the bytecode represents Forth operators.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question