Addressing Mode |
Effective Address |
Value of ACC(Accumulator) |
Comment |
Direct |
90 |
150 |
In Direct Addressing mode, effective address is calculated using value stored in load instruction. Here, the value in instruction is 90 which is the effective address. Thus, value in ACC is 150. |
Immediate |
14 |
90 |
The value of Program Counter (current instruction pointer) is 12. Address is stored at 14 (given in the question) which is the effective address. So, value loaded in ACC is 90. |
Indirect |
150 |
77 |
For Indirect Addressing mode, we first go to address location 90. The effective address will be the value stored at 90 which is 150 and value at 150 is loaded in ACC. Thus, 77 is loaded into ACC. |
Relative |
16+90=106 |
200 |
Current Value of Program Counter (PC) is 12. Value of PC for next instruction is 16. So for relative addressing we add 90 to 16 (=106) to get the effective address for the load instruction i.e. the position which is 90 ahead of next instruction address value which is further used as effective address. Value in ACC will be 200. |
Index |
800+90=890 |
96 |
Using R1 as index register, in index addressing mode, effective address is the value of sum of index register and address in current instruction i.e. 800+90 = 890. Value in ACC is 96 i.e. value stored at 890. |
Register |
address of R1 |
800 |
Effective address in Register Addressing mode is the address of register itself. In some texts, it is also shown as none. Value in ACC is the value in the register R1 i.e. 800. |
Register Indirect |
800 |
700 |
In Register Indirect Mode, the value in the register is used as the effective address i.e. 800. The value in ACC will be value at location 800 which is 700. |
Compute the effective address and the content of ACC (accumulator) for a load instruction of a...
ISA & Addressing Mode The instruction opcodes and formats for a computer system are as follows Format AD AD OP AD SA OP SA SA LDdir LDindir LDrel LDindex ACC ← 씨씨ADn ACC ← OP ACC ← MPC-AD] ACC ← MRtSA].OP] ACC -RISA] 001 010 011 101 110 ·ISA Suppose the Instruction format ts as follows: AD: Address write the Operation for LDimm and LDreg (for immediate and register direct addressing) OP: Constant Operand SA : Register A ACC is...
Identify the location of the following corresponding operand if the address field in an instruction contains decimal value 15. i. immediate addressing ii. direct addressing iii. indirect addressing iv. register addressing v. register indirect addressing
Given the following memory values and address instruction with an accumulator. Determine the values with the following instructions load into accumulator. Word 16 contains 22 Word 18 contains 24 Word 20 contains 26 Word 22 contains 28 Word 24 contains 30 Word 26 contains 32 Word 28 contains 34 i. LOAD IMMEDIATE 16 ii. LOAD DIRECT 16 iii. LOAD INDIRECT 16 iv. LOAD IMMEDIATE 18 v. LOAD DIRECT 18 vi. LOAD INDIRECT 20 vii. LOAD IMMEDIATE 24 viii. LOAD DIRECT...
HELP ME WITH TRUE / FALSE and Multiple choices. Fixed-width instructions make it difficult to decode because the number of bytes each instruction is using can change. True False A register is incremented by either a byte or a word to advance to the next element in an array with Indexed Addressing. True False The "la" instruction is an example of a pseudo-instruction. True False PC-relative addressing uses the program counter as the base address. True False PC-relative addressing uses...
The AVR provides a rich instruction set to support high-level languages. The AVR address- ing modes also simplify the access of complex data structures. The AVR has a version of the ADD instruction that includes the C flag as one of the source operands, which enables multiple- precision addition operation. The AVR also has a version of the SUB instruction that includes the C flag as one of source operands and hence is used to perform multiprecision subtraction operation. The...
Question 21 Suppose we have the instruction Load 800. Given register R1 has the value 300 and memory as follows: Memory 800 900 900 1000 1000 500 1100 600 1200 800 What would be loaded into the AC if the addressing mode for the operation is indexed relative to R1?
Solve the following problems clearly - assembly - computer
organization and architecture- william stallings
1)
2)
Let the address stored in the program counter be designated by the symbol X1. The instruction stored in X1 has an address part (operand reference) X2. The operand needed to execute the instruction is stored in the memory word with address X3. An index register contains the value X4. What is the relationship between these various quantities if the addressing mode of the instruction...
pls both ans
Question 20 5 pts Suppose a computer has 32-bit instructions. The instruction set consists of 64 different operations. All instructions have an opcode and two address fields (allowing for two addresses). The first of these addresses must be a register direct address, and the second must be a memory address. Expanding opcodes are not used. The machine has 16 registers. How many bits can be used for the memory address? Question 21 5 pts Suppose we have...
Instruction set architecture R: register X, Y, Opl, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X, Y XCH Opl, Op2 ADD X, Y SUB X,Y SAL Op, Quantity SAR Op, Quantity Shift Arithmetic Right on Op for Quantity SHR Op Quanti AND X, Y OR X, Y XOR X, Y NOT X LOADR, A LOAD R, (A STORE R, A STORE R, (A Description Move data from Y to X Exchange Op1 with Op2...
Instruction set architecture R: register X, Y, Op1, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X Y XCH Opl, Op2 ADD X, Y SUB X, Y SAL Op. Quantity SAR Op. Quantity SHR Op Quantity AND X, Y OR X. Y XOR X, Y NOT X LOAD RA LOAD R. (A) STORERA STORE R. (A) Description Move data from Y to X Exchange Opl with Op2 X=X+Y X=Y-X Shift Arithmetic Left on Op for...