9608_w18_qp_12
A paper of Computer Science, 9608
Questions:
6
Year:
2018
Paper:
1
Variant:
2

Login to start this paper & get access to powerful tools

1
2
3
The following 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 compare instruction, jump to if the compare was True. JPN Following 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 absolute addressing and symbolic addressing. Absolute addressing Symbolic addressing Give an example of an ADD instruction using both absolute addressing and symbolic addressing. Absolute addressing Symbolic addressing State what is meant by indexed addressing and immediate addressing. Indexed addressing Immediate addressing Give an example of an instruction that uses: Indexed addressing Immediate addressing 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: Address Instruction ASCII code table (selected codes only) LDD 100 ASCII code Character CMP 104 / JPE 54 * LDX 100 - CMP 105 + JPN 47 ^ OUT = LDD 100 DEC ACC STO 100 INC IX JMP 41 END … IX This is a copy of the instruction set. 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.
4
5
6