Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

13. The following expressions are given in MSP430 assembly language. All registe

ID: 3755314 • Letter: 1

Question

13. The following expressions are given in MSP430 assembly language. All registers are 16-bit wide and memory addresses point to 16-bit word data. Before each expression, it is assumed that register and memory contents are as follows: R7 0; R8 027Ch; R9 32F4h; contents of address 32F4h 3AC5h; contents of address 027Ch 90EEh. Complete the following table filling up the column of results. Write results to indicate the new value of the register changed by the instruction; for example if, after the instruction, R12 changes to number 123, write R12 123. Transaction Result (indicate new register contents; 5 points each) MOV R8, R9 MOV o(R8), R9 MOV @R9, R8 ADD R8, R9 MOV 027Ch(R7), R8 ADD #013Fh, R8

Explanation / Answer

The below table indicates the results of each instruction:

1st instruction- simple move instruction from src to destination mov R8, R9 => R9=R8

2nd instruction- The addressing mode is indexed.

Mov 0(R8),R9=> The address used in this instruction is R8+0.

Therefore the content at address (R8+0) => R9

3rd instruction- The addressing mode used is register indirect

Mov @R9, R8 => the content at address that is stored in register R9(32F4h-address value) is moved to register R8.

4th instruction- simple add instruction that adds source and destination and stores the result in destination.

Add R8, R9=> R9= R9+R8

5th instruction- the addressing mode used is indexex. It is same as 2nd instruction.

6th instruction- Immediate value addressing mode.

Add 013Fh, R8=> R8=R8+013Fh

Instruction Result Mov R8,R9 R9=027Ch Mov 0(R8),R9 R9=90EEh Mov @R9,R8 R8=3AC5h Add R8,R9 R9=3570h Mov 027Ch(R7),R8 R8=90EEh Add #013Fh,R8 R8=03BBh
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote