Civil Engineering Reference
In-Depth Information
LD A, (2241H)
ADD A, B
LD (2242H), A
HALT
However, these days most programs are written in high-level languages , in
which a typed word or set of words (closely related to words of the English
language) describes an operation to be carried out on data. Each instruction
at this level may require execution of several assembly-level instructions.
High-level language programs must be compiled into assembler codes before
being translated into machine codes to be run by the processor. Examples of
high-level languages are Fortran, Basic and C (C is also known as a middle-
level language).
Each single assembly-level instruction is implemented in a sequence of
micro-operations or steps. In its turn, each micro-operation takes place typi-
cally in three stages, each initiated by a clock pulse:
1 The control unit sets up the control lines for the micro-operation.
2 The data or address is set onto the bus.
3 The operation is executed.
2.5.2 High-level languages
High-level languages consist of sets of instructions, each doing much more
than a single instruction from the processor instruction set. Each instruction
in a high-level language does something which is much more easily under-
stood by the ordinary person but cannot be understood by the processor
directly. Therefore, a program written in a high-level language has to be
compiled. Compilation is the process of stringing together all the individual
programs of assembly-level instructions, each representing a single 'high-
level' instruction, to produce a program comprising a list of instructions
which the processor is able to execute. The process of compilation is carried
out by the processor, using a special program of assembly-level instructions,
called a compiler.
Execution of the compiler program, which treats the high-level instructions
as data, translates source code into assembly instructions or object code. The
object code is in mnemonic form and must be translated into machine code
before it can be executed. This translation process, like compilation, is car-
ried out by another special machine-level program known as an assembler.
Compilers and assemblers are special programs which generate assembly
code (the compiler) and then machine code (the assembler) for execution by
a particular processor.
To make it easy for a human operator to get the processor to carry out
Search WWH ::




Custom Search