Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Teaching guidance

Part 1: Theory fundamentals

Chapter 6: Assembly language programming


Main aims
To introduce learners to:
 machine code instructions
 assembly language
 the assembler
 addressing modes
 assembly language instructions.

Possible programme of study Resources


Syllabus Suggested Resources in the Resources in this Past paper questions
section number of coursebook guide
Topics
40 min.
lessons
1 Machine code 4.2 2 Task 6.01 Worksheet 6.1
and assembly Discussion Point Question 1
language Worksheet 6.2
Question 1
2 The 4.2 3 Exam-style Worksheet 6.1 9608/11 Nov 2017 Q4
assembler Questions Question 2
2 and 3
3 Assembly 4.2 2 Worksheet 6.1 9608/11 Nov 2018 Q4
language and 4.3 Questions 3 and 4
instructions
4 Assembly 4.2 5 Tasks 6.02 and 6.03 Worksheet 6.1 9608/11 Jun 2017 Q4
language Worked Examples Questions 5, 6 9608/11 Nov 2017 Q4
programs 6.01, 6.02 and 6.03 and 7 9608/11 Nov 2018 Q4
Question 6.01 Worksheet 6.2
Extension Questions 2, 3
Question 6.01 and 4
Exam-style
questions 1, 2 and 4

© Cambridge University Press 2019


Preparing for this chapter
Formative assessment may use any or all of the Exam-style Questions in the coursebook.
Use the bullet-pointed items in the summary at the end of the coursebook chapter to identify which topics
learners have understood and which need further study.

Topic 1: Machine code and assembly language


Covering coursebook sections 6.01 Machine code instructions and 6.02 Assembly language.

Introduction
The syllabus has defined the following learning objective relating to this topic:
 show understanding of the relationship between assembly language and machine code.

Teaching guidance
Introducing the topic
You need a simple presentation.

Engaging with the topic


This will happen through the study of the remaining topics in this chapter.

Opportunities for assessment


Check that learners understand the following before moving on to the next topic:
 A machine code instruction is stored in binary.
 Every machine code instruction has an exactly matching assembly language instruction.
 Each instruction consists of an opcode and, possibly, a number of operands.
 The opcode defines an operation, an address mode and register addressing.

Differentiation
Supporting learners
Learners could answer Question 1 in Worksheet 6.1.

Challenging learners
Use the introduction to section 6.02 in the coursebook to get learners thinking the binary coding used for a
machine code instruction.

© Cambridge University Press 2019


Learners could be asked to consider the Discussion Point in the coursebook and to attempt question 1 in
Worksheet 6.2.

Further reading
https://www.webopedia.com/TERM/M/machine_language.html
http://www.linfo.org/machine_code.html
https://whatis.techtarget.com/definition/machine-code-machine-language

Topic 2: The assembler


Covering coursebook sections 6.03 Symbolic, relative and absolute addressing and 6.04 The assembly process for
a two-pass assembler.

Introduction
The syllabus has defined the following learning objective relating to this topic:
 describe the different stages of the assembly process for a two-pass assembler.

This topic can be taught in isolation. It does not underpin the content in the remaining two topics of this chapter.
If you think it would be suitable to teach your students beyond the core content, please refer to the
Differentiation section.

Teaching guidance
Introducing the topic
You will need a presentation explaining how machine code instructions will be created by the translation process.
The presentation should discuss the issue of defining addresses for these machine code instructions.
The presentation should then describe how a two-pass assembler can handle symbolic addresses by using a
symbol table. The program contained in Section 6.03 of the coursebook chapter could be used as an example.

Engaging with the topic


Learners need to consolidate their knowledge by constructing symbol tables from example assembly
language code.

Opportunities for assessment


Check that learners understand the following before moving on to the next topic:
 In addition to assembly language instructions, an assembly language program can also contain comments,
macro or subroutine calls, directives and system calls.
 The first pass is used to resolve forward references.
 The second pass uses an opcode lookup table.

© Cambridge University Press 2019


Differentiation
Supporting learners
Learners may find it helpful to study the concept of a symbol table in relation to this topics.
Ask your learners to answer Question 2 from Worksheet 6.1.

Language awareness
Learners should be warned that, in the A Level content they will learn that a symbol table is used by a compiler as
well as by an assembler. The two different types should not be confused.

Further reading
http://www.entcengg.com/two-pass-assemblers/

Topic 3: Assembly language instructions


Covering coursebook sections 6.05 Addressing modes and 6.06 Assembly language instructions

Introduction
The syllabus has defined the following learning objectives relating to this topic:
 show understanding of modes of addressing
 show understanding that the set of instructions are grouped into instructions for:
o data movement
o input and output of data
o arithmetic operations
o unconditional and conditional jumps
o comparisons
 show understanding of, and perform, binary shifts.
To improve learners’ understanding, explain the subtle difference between the two contexts for considering
addressing. The first of these relates to the identification of the memory addresses used by the assembly
language program. The second relates to how an operand address is identified for a particular instruction.
The syllabus provides an example of an instruction set. However, learners should be advised that some questions
may introduce other instructions for which the definition will be included in the question. If learners have already
been exposed to a different definition (or are likely to be) then they need to be aware of the differences. Learners
must understand that, in any situation, an instruction will have a precise definition which must not be ignored.
Learners are not expected to remember this instruction set.
You may choose to postpone instructions for bitwise operations until the next chapter. However, if you do so, you
should, at that stage, emphasise that these are used in many different contexts, not just in association with
monitoring and control systems.

© Cambridge University Press 2019


Teaching guidance
Introducing the topic
You could give a presentation to cover two themes: addressing modes and the classification of types of
instruction.
You need to discuss shift operations and remind learners about the problems concerning binary addition.

Engaging with the topic


This will happen in the last topic for this chapter.

Opportunities for assessment


Check that learners understand the following before moving on to the next topic:
 There are four options for an addressing mode (immediate, direct, indirect and indexed, of which); only the
last three require a memory address to be supplied in the instruction.
 The compare instructions only test equality.
 Input and output instructions use the ASCII code for characters.
 Shift operations either multiply or divide a value by two.

Differentiation
Supporting learners
Ask learners to answer Questions 3 and 4 from Worksheet 6.1.

Topic 4: Assembly language programs


Covering coursebook section 6.07 Further consideration of assembly language instructions.

Introduction
The syllabus has defined the following learning objective relating to this topic:
 trace a given simple assembly language program.

Introduce learners to the ways in which they will be expected to apply their knowledge and understanding.

© Cambridge University Press 2019


Teaching guidance
Introducing the topic
You need an introduction to the approaches for applying knowledge and understanding. You could use the
worked examples in the coursebook.

Engaging with the topic


Paper-based exercises are appropriate. You could ask learners to work individually or in pairs, with one providing
code and the other interpreting the effect of its execution. Two types of exercise are needed: relatively simple
exercises recording the effect of an instruction, and more complicated exercises requiring tracing a simple
complete program. Provide learners with a copy of the table in section 4.2 of the syllabus containing the list of
assembly language instructions. It would also be useful to give learners an ASCII code table.
Use coursebook Tasks 6.02 and 6.03, and Question 6.01. You could also use Extension Question 6.01 if you have
postponed the conclusion of binary addition until now.

Opportunities for reflection


Ask learners to reflect on the Reflection Question from the coursebook.

Differentiation
Supporting learners
Ask learners to answer Questions 5, 6 and 7 in Worksheet 6.1.

Challenging learners
Ask learners to answer Questions 2, 3 and 4 in Worksheet 6.2.

© Cambridge University Press 2019

You might also like