Assemblers
In the early days of
programming, machine code (binary) was the only option. Unfortunately this was
laborious, prone to error and difficult. A slight improvement on this was the
use of hexadecimal or octal which reduced the number of errors and the time to
enter the program. Eventually assembly languages were developed which were
easier and more productive to use whilst preserving the speed and compactness
of machine code.
Assembly languages
vary from one type of computer to another (or more correctly from processor to
processor) which results in a difficulty in transporting programs from one
computer to another.
Assemblers are the simplest
of all the translators to understand since the majority of the statements in
the source code are mnemonics (short words that help you to remember something)
representing specific binary patterns - the others being labels, directives (or
pseudo-ops) which give instructions to the assembler.
So, for instance,
rather than enter the binary pattern 01011100 which might mean “Increment the
contents of the Accumulator by 1” we could type in the mnemonic “INC” which the
assembler would translate into the appropriate binary pattern.
Interpreters
An
interpreter is another common kind of language processor. Instead of
producing a target program as a translation, an interpreter appears to directly
execute the operations specified in the source program on inputs supplied by
the user, as shown in Fig.
Comments
Post a Comment