Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Describe the different stages of the assembly process for a two-pass assembler
Learning Objective/s:
  • Describe the two‑pass assembly process and its distinct stages.
  • Explain the role of the symbol table and location counter in address resolution.
  • Identify how forward references and relocation are handled between passes.
  • Apply the two‑pass method to translate a simple assembly fragment into object code.
  • Detect common assembler errors such as duplicate labels and undefined symbols.
Materials Needed:
  • Projector or interactive whiteboard
  • Slide handout summarising two‑pass assembler stages
  • Worksheet with sample assembly code and symbol‑table template
  • Assembler software or online simulator for live demo
  • Whiteboard and markers
  • Laptop for teacher demonstration
Introduction:
Begin with the question, “How does a computer know where each label in an assembly program should point?” Review students’ prior experience with compilers and address resolution. Explain that today they will discover why assemblers use two passes and what each pass must accomplish to produce correct machine code.
Lesson Structure:
  1. Do‑Now (5') – Students list challenges an assembler faces with forward references.
  2. Mini‑lecture (10') – Explain the need for a two‑pass assembler; introduce location counter and symbol table.
  3. First Pass activity (12') – Walk through scanning a sample program; students fill a symbol‑table worksheet.
  4. Second Pass demonstration (12') – Teacher shows code generation using the completed table; students map mnemonics to op‑codes.
  5. Guided practice (10') – Pairs complete the full two‑pass process for a new short fragment and produce object code.
  6. Error‑spotting quiz (8') – Quick quiz on duplicate labels, undefined symbols, and directive misuse; discuss answers.
  7. Recap & Exit ticket (3') – Students write one thing they learned and one question on a sticky note.
Conclusion:
Recap that the first pass builds a symbol table while the second pass generates machine code using that table, resolving forward references and relocation. Students submit an exit ticket describing the two passes in their own words. For homework, they will assemble a provided program using an online assembler and note any errors encountered.