0% found this document useful (0 votes)
28 views

Chapter 6 Assembly Language-PPandMS-15

The document describes an assembly language program for a processor with one general purpose register called the Accumulator (ACC). It shows instructions like LDD, STO, LDI, and LDX that load data from memory addresses into the ACC, store the ACC contents to memory, and perform indirect and indexed addressing. The question asks the student to (1) show the ACC contents after instructions, (2) explain how they arrived at their answers, and (3) trace an assembly language program using a trace table to track the ACC and memory contents.

Uploaded by

Riaz Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Chapter 6 Assembly Language-PPandMS-15

The document describes an assembly language program for a processor with one general purpose register called the Accumulator (ACC). It shows instructions like LDD, STO, LDI, and LDX that load data from memory addresses into the ACC, store the ACC contents to memory, and perform indirect and indexed addressing. The question asks the student to (1) show the ACC contents after instructions, (2) explain how they arrived at their answers, and (3) trace an assembly language program using a trace table to track the ACC and memory contents.

Uploaded by

Riaz Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

14

7 The table shows assembly language instructions for a processor which has one general purpose
register, the Accumulator (ACC).

Instruction
Explanation
Op code Operand

LDD <address> Direct addressing. Load contents of given address to ACC

STO <address> Store the contents of ACC at the given address

Indirect addressing. The address to be used is at the given


LDI <address>
address. Load the contents of this second address to ACC

Indexed addressing. Form the address from <address> +


LDX <address> the contents of the index register. Copy the contents of this
calculated address to ACC

INC <register> Add 1 to contents of the register (ACC)

JMP <address> Jump to the given address

END Return control to operating system

The diagram shows the contents of the memory.

Main memory

120 0000 1001

121 0111 0101

122 1011 0110

123 1110 0100

124 0111 1111

125 0000 0001

126 0100 0001

127 0110 1001

200 1000 1000

© UCLES 2015 9608/13/M/J/15


15

(a) (i) Show the contents of the Accumulator after execution of the instruction:

LDD 121

Accumulator:

[1]

(ii) Show the contents of the Accumulator after execution of the instruction:

LDI 124

Accumulator:

Explain how you arrived at your answer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [3]

(iii) Show the contents of the Accumulator after execution of the instruction:

LDX 120

Index Register: 0 0 0 0 0 1 1 0

Accumulator:

Explain how you arrived at your answer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [3]

© UCLES 2015 9608/13/M/J/15 [Turn over


16

(b) Trace the assembly language program using the trace table.

300 LDD 321


301 INC
302 STO 323
303 LDI 307
304 INC
305 STO 322
306 END
307 320

320 49
321 36
322 0
323 0

Trace table:

Memory address
Accumulator
320 321 322 323

49 36 0 0

[6]

© UCLES 2015 9608/13/M/J/15


Page 8 Mark Scheme Syllabus Paper
Cambridge International AS/A Level – May/June 2015 9608 13

7 (a) (i)
Accumulator: 0 1 1 1 0 1 0 1
[1]

(ii)
Accumulator: 0 1 1 0 1 0 0 1
[1]

explanation

• content of 124 is 0 1 1 1 1 1 1 1
• this is equivalent to 127
• contents of 127 are 0 1 1 0 1 0 0 1 [2]

(iii)

Accumulator: 0 1 0 0 0 0 0 1
[1]

explanation

• index register value = 6


• 120 + 6 = 126
• contents of 126 placed in the accumulator [2]

(b) 1 mark for each correct value in the table.

Accumulator Memory address

320 321 322 323

49 36 0 0

36

37

37

49

50

50

[6]

© Cambridge International Examinations 2015

You might also like