Question

Problem 2 (40 points) a) Suppose we want to replace the STA instruction in our basic computer with the following XCH instruct

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

a) Suppose STA (Store Accumulator(PC) contents into a given Memory Address M(AR) ie

Register Transfer Notation for STA is D3T4: M(AR) <--- PC,SC<-- 0;

If we Replace STA with XCH ( exchange contents of AC and Memory) Instruction the Register Transfer Notation for execution is:

R'T0 : AR <-- PC, (Fetch Cycle)

R'T1 : IR <--- M[AR],PC <--PC +1;

R'T2  : D0,D1,D2,D3,D4,D5,D6. (Decode Cycle)

D3T4: TR <--- AC {Transfer the contents of AC to Temporary Register). [Execute Cycle]

AC <--- M[EA] { Transfer the Contents of given Effective Address(Physical Address) of Memory to AC}.

M[EA] <---- TR { Transfer the Contents of Temporary Register(TR) to given Effective Address(Physical Address) of Memory.

b) BSA ( Branch and Save Address) : Save address of the next instruction and Branch to subroutine:

Given that: 1 BSA 50 Means : 1 Indicates Indirect Addressing so AR = 50 ie (AR)=100 {Contents of AR) as shown in figure given.

BSA Execution Steps: D5T4 : M[AR] <--- PC, PC ADDRESS :21 ( Current Instruction location =20)

AR <-- AR +1 ( AR =50 and Indirect Mode=1 ,So (AR) =100) AR +1 = 101

D5T5 : PC <--- AR, (PC = 101)

SC <--- 0.

Answer: Next Instruction Address is :101 After Execution of given BSA, PC and Memory is shown below:

20

1           BSA       50

PC=21

NEXT INSTRUCTION

AR=50

100

EA =100

21

PC =101

SUBROUTINE

1    BUN        100

  

Add a comment
Know the answer?
Add Answer to:
Problem 2 (40 points) a) Suppose we want to replace the STA instruction in our basic...
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