Question

Compute the effective address and the content of ACC (accumulator) for a load instruction of a 1-address machine for each type of addressing modes using the following assumptions The load instruction is of length 4 bytes, the first byte is for op ode and mode and the other two bytes contain the value 90 for an address or an immediate value ? The load instruction is stored in locations 12-15 The register (say R1)contains the value 800; The location 800 contains the value 700; The location 90 contains the value 150; . The location 150 contains the value 77; . The location 102 contains the value 11; The location 106 contains the value 200; The location 890 contains the value 76 Direct Immediate Indirect Relative Index Register Register Indirect

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Table showing the value of effective address and ACC values

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.

Add a comment
Know the answer?
Add Answer to:
Compute the effective address and the content of ACC (accumulator) for a load instruction of a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT