Please explain your answer. wl.48.pat Adobe Acrobat Reader DC File Edit View Wnd
ID: 3882068 • Letter: P
Question
Please explain your answer.
wl.48.pat Adobe Acrobat Reader DC File Edit View Wndow Help Home Tools hw1.s18.pdfX Sign In 100% Problen H4 (25 points) MSP430 Instructions Consider the tollowing instructions given in the table below For each instruction determane changes in registers after its execution Fill in the empty cells n the table Tntal value of registers R2, R5, and R7ss as follows. R2=0xd007 (Status register. R-UnBB00. K7x40AS Assume the start ng condations are the same for each instruction the table e. always stast romthe initial conditions in registers). Note: Format of the segister R2 is shown below. For a detailed description of the instructios use the 4xx fily us guide. Export PDF A Adobe Export PDF Convert PDF Fles to Word or Excel Online Select PDF File Iustruction hw1s18.pdf ADD R6, R7 Convert to ADDC R6, R7 Microsoft word (..doc) '.. SUB.B R6 Dccument Language: English (U5.) Change SUBC R5 R7 Convert Create PDF BIS Edit PDF R6, R7 AND R6 R7 Comment XOR B R6, R7 Combine Files v Organize Pages v Redact SWPB R7 RRCB R7 RRC R7 RA Protect RRA Dex unent Cleud Learn More 402 PM 2/1/2018Explanation / Answer
instruction
R7=0x?????
V(overflow bit)
N(negative bit)
Z(zero bit)
C(carry bit)
ADD.B R6, R7
(The suffix .B at the instruction memonic will result in a byte operation)
R6+R7->R7
R7=0xFBAF
0
0
0
1
ADD R6, R7
R6->R6+R7 //so R7 is same AND R6=0xFBAF
0
0
0
1
ADDC R6, R7
R6->R6+R7+C// R7 is same where C is carry bit
R6=0x1F75F
0
0
0
1
SUB.B R6, R7
R6+(NOT R7)+1->R7
R7=0x100FBB1
0
0
0
1
SUBC R6, R7
R6->R6-R7+C
R6= 0xFFF1E7A5
CMP.B R6, R7
R7-R6
0
0
0
1
CMP R6, R7
R6-R7
0
0
0
1
BIT R6, R7
R7&R6 // nothing is written
0
0
0
0
BIC R6, R7
R6&(NOT.R7)->R7
0
0
0
0
XOR.B R6, R7
R7=R7^R6
0
0
0
0
SWP.B R7
Swap bytes of R7(SWAP 8 BIT REGISTER HALVES)
0
0
0
0
RRC.B R7
9 bits rotate through carry
RRC R7
RRA.B R7
Do 8 bit arithmetic right
RRA R7
instruction
R7=0x?????
V(overflow bit)
N(negative bit)
Z(zero bit)
C(carry bit)
ADD.B R6, R7
(The suffix .B at the instruction memonic will result in a byte operation)
R6+R7->R7
R7=0xFBAF
0
0
0
1
ADD R6, R7
R6->R6+R7 //so R7 is same AND R6=0xFBAF
0
0
0
1
ADDC R6, R7
R6->R6+R7+C// R7 is same where C is carry bit
R6=0x1F75F
0
0
0
1
SUB.B R6, R7
R6+(NOT R7)+1->R7
R7=0x100FBB1
0
0
0
1
SUBC R6, R7
R6->R6-R7+C
R6= 0xFFF1E7A5
CMP.B R6, R7
R7-R6
0
0
0
1
CMP R6, R7
R6-R7
0
0
0
1
BIT R6, R7
R7&R6 // nothing is written
0
0
0
0
BIC R6, R7
R6&(NOT.R7)->R7
0
0
0
0
XOR.B R6, R7
R7=R7^R6
0
0
0
0
SWP.B R7
Swap bytes of R7(SWAP 8 BIT REGISTER HALVES)
0
0
0
0
RRC.B R7
9 bits rotate through carry
RRC R7
RRA.B R7
Do 8 bit arithmetic right
RRA R7