Pular para o conteúdo

Labs · 9618 AS 4.2

Two-Pass Assembler

Be the assembler. Find the address of every label in pass 1, then turn the labels into addresses in pass 2, and find the line that stops it.

6 levelsFree bench

In the exam

9618/12 May/June 2023 · Question 3(a) · 3 marks

A two-pass assembler translates a program. Match each action to the pass (first, second or both) in which it happens.

Points that gain marks

  • Reads the source code one line at a time: both passes.
  • Removes white space and adds labels to the symbol table: first pass.
  • Generates the object code: second pass.

In this lab: Pass 1 here builds the symbol table; pass 2 writes the object code with an address in place of each label.

More real experiments

Entrar ou criar conta

IGCSE, A-Level & AP