I am having a problem with two practice problems. I read the Appendix from the H
ID: 2085300 • Letter: I
Question
I am having a problem with two practice problems. I read the Appendix from the HCS12 Microcontrollers and Embedded Systems, 1st Edition and could not figure out how to get the answer. I used Freescale Codewarrior and tested different codings to get the value to match answer choice. The result is close to the answers, but it is not accurate to explain. Due tonight
Given questions: Determine the given variable for each question and explain the outcome of each exercise answers?
Assume that X = $1050, A = $22, M[1050] = $B4, M[1052] = $5A, After LDAA 2,X:
X = $1052, A = $5A, M[1050] = $B4, M[1050]=$5A
X = $1050, A = $5A, M[1050] = $B4, M[1050]=$5A
X = $1052, A = $B4, M[1050] = $B4, M[1050]=$5A
X = $1050, A = $B4, M[1050] = $B4, M[1050]=$5A
Assume that X = $1050, A = $22, M[1050] = $B4, M[1052] = $5A, After LDAA 2,X+:
X = $1052, A = $B4, M[1050] = $B4, M[1050]=$5A
X = $1052, A = $5A, M[1050] = $B4, M[1050]=$5A
X = $1050, A = $B4, M[1050] = $B4, M[1050]=$5A
X = $1050, A = $5A, M[1050] = $B4, M[1050]=$5A
Explanation / Answer
1.)
LDAA2,X means load the accumulator with the contents of location pointed to by X,but with an offset of 2.
X=$1050,
2,X=$1052
So LDAA2,X means load the accumulator with contents of $1052.
so the answer is X=$1050,A=$5A,M[1050]=$B4,M[1052]=$5A
2.
LDAA2,X+ means load the accumulator and also the X with the contens of $1052.
X = $1052, A = $5A, M[1050] = $B4, M[1052]=$5A
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.