Low-Level Languages
Low-Level Languages
Low-level languages
sit close to the computer's
instruction set
. An instruction set is the set of
instructions
that the
processor
understands.
machine code
assembly language
Machine code
An instruction set relates to a specific processor and is written in machine code.
The central processing unit (CPU) understands machine code directly and can act
upon the instructions. A
program
written in machine code consists of 0s and 1s only. Machine code is very difficult
to learn, write and
debug
. Even a very simple program could have thousands of 0s and 1s in it.
Assembly language
Assembly language sits between machine code and
high-level languages
in terms of ease of use. While high-level languages use
statements
to form instructions, assembly language uses
mnemonics
(short abbreviations). Each mnemonic directly corresponds with a single machine
code instruction. Here are some examples of mnemonics:
Mnemonic Action
LDA Loads a value from a memory address
STA Stores a value in a memory address
ADD Adds the value held in a memory address to the value held in the accumulator
SUB Subtracts from the accumulator the value held in a memory address
MOV Moves the contents of one memory address to another