9608_w18_qp_11
A paper of Computer Science, 9608
Questions:
7
Year:
2018
Paper:
1
Variant:
1

Login to start this paper & get access to powerful tools

1
2
3
4
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 location at 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. LDR #n Immediate addressing. Load the number n to IX. 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 the screen the character whose ASCII value is stored in ACC. END Return control to the operating system. State what is meant by direct addressing and indirect addressing. Direct addressing Indirect addressing Explain how the instruction ADD 20 can be interpreted as either direct or indirect addressing. Direct addressing Indirect addressing The assembly language instructions in the following table use either symbolic addressing or absolute addressing. Tick (3) one box in each row to indicate whether the instruction uses symbolic or absolute addressing. Instruction Symbolic Absolute ADD 90 CMP found STO 20 The current contents of a general purpose register (are: X The contents of X represent an unsigned binary integer. Convert the value in X into denary. The contents of X represent an unsigned binary integer. Convert the value in X into hexadecimal. The contents of X represent a two’s complement binary integer. Convert the value in X into denary. The current contents of the main memory, Index Register (and selected values from the ASCII character set are provided with a copy of the instruction set. Address Instruction LDX 200 OUT STO 203 LDD 204 INC ACC STO 204 INC IX LDX 200 CMP 203 JPN 81 OUT LDD 204 CMP 205 JPN 74 END … IX ASCII code table (selected codes only) ASCII code Character ? ! “ * $ & % / Instruction Explanation Op code Operand LDD Direct addressing. Load the contents of the location at 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. LDR #n Immediate addressing. Load the number n to IX. 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 the screen the character whose ASCII value is stored in ACC. END Return control to the operating system. Instruction set
5
6
7