9618 · 4.2
Assembly Language — FAQ
Frequently asked questions for 9618 Assembly Language. Direct answers first, then deeper explanation — then practise with marking.
Why do we learn assembly language when high-level languages are so much easier to use?
Learning assembly language provides a fundamental understanding of computer architecture. It reveals how the CPU, memory, and registers work together. This knowledge is crucial for performance-critical applications like device drivers, embedded systems, and real-time computing, where direct hardware control is necessary.
Is assembly language the same for all computers?
No, it is not. Assembly language is architecture-specific. An assembly program written for an Intel x86 processor will not run on an ARM processor (found in most smartphones) because they have different instruction sets, registers, and architectures. This is why assembly language is not considered 'portable'.
What is the difference between an opcode and an operand?
The opcode (operation code) is the instruction itself—it tells the CPU what to do (e.g., ADD, LDR, JMP). The operand is the data or memory address that the instruction operates on—it tells the CPU what to do it with (e.g., the value #5 or the address 250).
What is a 'two-pass assembler' and why is it needed?
A two-pass assembler reads the assembly code twice. It's needed to handle 'forward references'—when an instruction jumps to a label that hasn't been defined yet. On the first pass, it builds a symbol table of all labels and their addresses. On the second pass, it uses this completed table to translate all instructions, including the forward jumps, into machine code.