***Assume that all bytes in the variables va, vb, and vc are initially zero ***A
ID: 3745232 • Letter: #
Question
***Assume that all bytes in the variables va, vb, and vc are initially zero
***Answer in hexadecimal and please explain how you arrived at the answer
For each of the instructions highlighted in bold, derive the effective address of the memory variable (source) {if any memory variable is involved}, and the contents of the register a or d (whichever one involved) immediately after the instruction is executed.
RAMStart EQUS0800 ROMStart EQUS4000 ORG DS B DS B DS.W DC.BS01,S10,SAF,"1" DC.W 01,S10,S800,8806,"1","234" RAMStart va Vc ve ORG ldaa ldd ldd ROMStart #812 #5802 $802 va $810 #vd 0.x 3.x 2,+X ldx Idaa Idaa Idaa Idaa ldab Idaa idx ldaa S14,x Idd ldaa [d.x b.x #5802 #22Explanation / Answer
In this question
The address for
1)first Idaaafter ROM start is- 4000+12=4012,and here the value of a will be 1 so as will be 11 which is stored in address 4012.
2)for first Idd the address will be - 4000+802=4802,and here the value of variable will be - 5 which is stored in this address.
3) for 2nd Idd the adress will be- 4000+802=4802,and the value of d will be 5 again which is replaced by the first one and take place the new one.
4)2nd Idaa the value of aa will assigned 1 as the value of va is 1.
5)the 3rd Idaa will take place at the adress 4000+810=4810, and here the value of aa will be 1 and will load in this address.
6) for the 4th Idaa here at first aa will be assigned value-0 and the first x value will be - 1.
7)for 5th Idaa at first aa will assigned value of 3 then x got value of 0.and so on.....
Thank you....
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.