MSP430G2553 Microprocessor 7.11 Write an assembly program with the following spe
ID: 3723734 • Letter: M
Question
MSP430G2553 Microprocessor
7.11 Write an assembly program with the following specifications. a. In the main block, you should have two registers R4 and R5. They should be checked in an infinite loop. If R4 is greater than R5, then the greater subroutine will be called. If R4 is less than R5, then the less subroutine will be called. If R4 equals R5, then no operations will be done. b. In the greater subroutine, your code will fill the decimal numbers 1, 2, 3, 4, 5 in hexadecimal form to five successive memory locations. After this operation, the value in R4 will be decreased by one c. In the less subroutine, your code will fill the decimal numbers 10, 9, 8, 7, 6 in hexadecimal form to five successive memory locations. After this operation, the value in R4 will be decreased by one.Explanation / Answer
ASSEMBLY PROGRAMME :
# include <stdio.n>
int main ()
{
int num1,num2;
resister int sum;
Print f (“ enter the number 1:”);
Scan f (“%d”,& num 1);
Print f (“ enter the num 2:”);
Scan f (“%d”,& num 2);
Sum = num1+num 2;
Print f (“ sum of numbers;%d’,sum return0(0);
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.