Assembly Language (Cambridge International IGCSE Computer Science)
Spec point —
4.2.2· "2 Understand that assembly language is a form of low-level language that uses mnemonics, and that an assembler is needed to translate an assembly language program into machine code"
Assembly Language
What is assembly language?
-
Assembly language is a second-generation, low-level language designed to simplify the writing of machine code instructions for programmers
-
Programmers use assembly language for the following reasons:
- Need to make use of specific hardware or parts of the hardware
- To complete specific machine-dependent instructions
- To ensure that too much space is not taken up in RAM
- To ensure code can be completed much faster
-
Assembly languages allow programmers to program with mnemonics, e.g.
- LDA Load - this will ensure a value is added to the accumulator
- ADD Addition - this will add the value input or loaded from memory to the value in the accumulator
- STO Store - stores the value in the accumulator in RAM
-
Assembly language allowed continuation of working directly with the hardware but removed an element of complexity
-
A mnemonic is received by the computer and it is looked up within a specific table
-
An assembler is needed to check the word so that it can be converted into machine code
-
If a match from the word is found (e.g. STO), the word is replaced with the relevant binary code to match that sequence
Worked Example Complete the table to identify whether each example of computer code is High-level, Assembly language or Machine code
Computer code High-level Assembly Machine code 101101110011011011100110FOR X = 1 to 10PRINT xNEXT XINP XSTA XLDA Y[3]
Answer
Computer code High-level Assembly Machine code 101101110011011011100110X [1 mark] FOR X = 1 to 10PRINT xNEXT XX [1 mark] INP XSTA XLDA YX [1 mark]
Was this revision note helpful?