Question 6(b)(ii) 2014 · October-November · Paper 33 · 1 mark
Reveal official mark-scheme answer

Official answer for Question 6
Part (b)
(ii)
(ii)
203
Question 33
Show text version of question
Question 6
Part (b)
(ii)
Question 6
The following are the first few lines of a source program written in a high-level language which is
about to be translated by the language compiler.
// invoicing program // program written 21 Oct 2014 DECLARE i : INTEGER; DECLARE Customer(40) : STRING; DECLARE Address: STRING; CONSTANT DiscountRate = 5;
// start of main program CALL InitialiseCustomerData REPEAT … … … The final stage of compilation is code optimisation.
(ii)
Consider three assembly language instructions that were given in Question 4.
Instruction Explanation Op Code Operand LDD <address> Direct addressing. Load the contents of the given address to ACC STO <address> Copy the contents of ACC to the given address INC <register> Add 1 to the contents of the register (ACC or IX)
Study the assembly language code below.
200 LDD 151 201 INC ACC 202 STO 151 203 LDD 151 204 INC ACC 205 STO 151
One instruction is not needed and could be removed during optimisation. State the address of this instruction.
Address of instruction ....................................................................................................[1]
Question 16
Why this question appears here
87% assigned-topic match · Processor fundamentals › Assembly language
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_w14_qp_33.pdf
