Assembly Language (Cambridge (CIE) O Level Computer Science) : Revision Note
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 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 |
---|---|---|---|
10110111 00110110 11100110 | |||
FOR X = 1 to 10 PRINT x NEXT X | |||
INP X STA X LDA Y |
[3]
Answer
Computer code | High-level | Assembly | Machine code |
---|---|---|---|
10110111 00110110 11100110 | X | ||
FOR X = 1 to 10 PRINT x NEXT X | X | ||
INP X STA X LDA Y | X |
You've read 0 of your 5 free revision notes this week
Unlock more, it's free!
Did this page help you?