Question 9

AQA Computer Science June 2022 Paper 2 (7516/2)AS5 marks

On the specification

9.1
3.7 Fundamentals of computer organisation and architecture
9.2
3.7 Fundamentals of computer organisation and architecture
Question text

9 1 box . Shade one lozenge to show which of the assembly instructions in Figure 7 uses immediate addressing. [1 mark] Figure 7 Immediate Instruction Addressing A LDR R3, 42 B MOV R3, #42 C STR R3, 101 D SUB R3, R2, R1 9.2 A computer program is required that will multiply the value stored in X by 2 if it is less than 50 and leave it unchanged if it is 50 or more. The algorithm for this task can be written in pseudocode as: IF X < 50 THEN X  X * 2 ENDIF Write an assembly language program using the AQA assembly language instruction set shown in Table 1 to carry out this task. At the start, the value of X is stored in memory location 101 [4 marks]