teach-ict.com logo

THE education site for computer science and ICT

2. Low Level Languages

Low level languages are tied to specific CPU families. Each CPU family requires its own low level language. Low level languages are almost (but not quite) machine code.

'Assembly language' is an example of a low level programming language.

CPU chip makers create assembly languages themselves. They teach programmers how to best use their assembly language when writing code for their family of CPUs.

Some features of Low Level languages include

  • They are CPU specific, making direct use of internal registers
  • 'Mnemonics' are used as programming code such as MOV or ADD
  • Many different memory modes can be used
  • Labels are used as reference points to allow the code to jump from one part to another.

Pros.

  • Low level languages are excellent for close control of the CPU, for example many device drivers are coded in assembly language.
  • They can be very efficient. Well-optimised code written in a low level language can be made to run very quickly compared to other programming paradigms.

Cons

  • They are difficult to use as the programming commands can be quite obscure
  • A good assembly language programmer needs to know a lot of detail about the internal structure of the CPU - e.g.its registers and memory management methods
  • Low level languages produce the least portable source code.

Assembly language looks like this:

.MODEL SMALL;
.STACK;
.CODE;
mov ah,1h; moves the value 1h to register ah
mov cx,07h;moves the value 07h to register cx
int 10h;

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is a low level language