full solution in attachment
Name different instruction format types of SRC “simple RISC computer”? Compare each type for the following features only:
a) Number of instructions
b) Addressing mode
Yours answer should be to the point and cover all the necessary details as asked in the question.
Solution
Four types of instructions are supported by the SRC
Type A
Type A is used for only two instructions:
Number of instructions
Addressing mode
Two instructions
• No operation or nop
• Stop operation stop
Both of these instructions do not need an operand (are 0-operand instructions).
Type B
Number of instructions
Addressing mode
Type B format includes three instructions; all three use relative addressing mode
• ldr instruction, used to load register from memory using a relative address
• The lar instruction, for loading a register with relative address
• The str is used to store register to memory using relative address
The effective address is computed at run-time by adding a constant to the PC. This makes the instructions ‘re-locatable’.