9608_s16_qp_12
A paper of Computer Science, 9608
Questions:
9
Year:
2016
Paper:
1
Variant:
2

Login to start this paper & get access to powerful tools

1
3
4
5
8
9
The table shows assembly language instructions for a processor which has one general purpose register, the Accumulator (ACC) and an index register (. Instruction Explanation Op code Operand LDD Direct addressing. Load the contents of the given address to ACC. LDX Indexed addressing. Form the address from + the contents of the index register. Copy the contents of this calculated address to ACC. STO Store contents of ACC at the given address. ADD Add the contents of the given address to ACC. INC Add 1 to the contents of the register (ACC or . DEC Subtract 1 from the contents of the register (ACC or . CMP Compare contents of ACC with contents of . JPE Following a compare instruction, jump to if the compare was True. JPN Following a compare instruction, jump to if the compare was False. JMP Jump to the given address. OUT Output to screen the character whose ASCII value is stored in ACC. END Return control to the operating system. The diagram shows the current contents of a section of main memory and the index register: 0011 0010 0101 1101 0000 0100 1111 1001 0101 0101 1101 1111 0000 1101 0100 1101 0100 0101 0100 0011 0110 1001 Index register: 0 Show the contents of the Accumulator after the execution of the instruction: LDX 60 Accumulator: Show how you obtained your answer. Show the contents of the index register after the execution of the instruction: DEC IX Index register: Complete the trace table on the opposite page for the following assembly language program. LDD 100 ADD 102 STO 103 LDX 100 ADD 100 CMP 101 JPE 58 JPN 59 OUT INC IX LDX 98 ADD 101 OUT END IX (Index Register) Selected values from the ASCII character set: ASCII Code Character v w x y z { | }