Question: What I'm stuck is right that the Red rectangle marked in the 2nd picture. Can you help me finish that part (Red triangle)? The question

 What I'm stuck is right that the "Red" rectangle marked inthe 2nd picture. Can you help me finish that part (Red triangle)?

What I'm stuck is right that the "Red" rectangle marked in the 2nd picture. Can you help me finish that part (Red triangle)? The question for it is right at the first picture and the whole code from the 2nd is just a skeleton. Thank you so much!

3 . CDA3331C Intro to Microcomputers Lab Assignment Name/Semester: Grade: /20 [20] 3) Implement the following arithmetic function using subroutines and develop the code to be as efficient as possible. The only input to the function is variable (a) that is initialized in register R4 at the beginning of the program to 5 and maintained thereafter. The X calculation result is stored in R5. The final answer, F, is stored in R7. where X =52(2(i !)) X +50 F=( ) 1-0 [12] 3.a) Write an MSP430 assembly language program that implements the above function using subroutines for Multiplication and Factorial. Multiply subroutine should take into account sign values. The overall program structure should be as follows RESET mov.w # STACK END,SP Initialize stack pointer LAB2 mov.w #5, R4 Load "a" into R4 R5 R6 R7 CLEAR clr clr clr clear the entire register clear the entire register clear the entire register ;the X calculation part of your program taking value of R4 as an input ;and returning result X in R5 XCALC FCALC the tinal part of your program ;taking inputs from R5 ;and returning result F in R7 MainLoop jmp Mainloop Infinite Loop MULT ;Included in the skeleton code [2] for Main Program - [1] XCALC, [1] FCALC [5] for Factorial Subroutine [5] for Multiplication Subroutine 3 . CDA3331C Intro to Microcomputers Lab Assignment Name/Semester: Grade: /20 [20] 3) Implement the following arithmetic function using subroutines and develop the code to be as efficient as possible. The only input to the function is variable (a) that is initialized in register R4 at the beginning of the program to 5 and maintained thereafter. The X calculation result is stored in R5. The final answer, F, is stored in R7. where X =52(2(i !)) X +50 F=( ) 1-0 [12] 3.a) Write an MSP430 assembly language program that implements the above function using subroutines for Multiplication and Factorial. Multiply subroutine should take into account sign values. The overall program structure should be as follows RESET mov.w # STACK END,SP Initialize stack pointer LAB2 mov.w #5, R4 Load "a" into R4 R5 R6 R7 CLEAR clr clr clr clear the entire register clear the entire register clear the entire register ;the X calculation part of your program taking value of R4 as an input ;and returning result X in R5 XCALC FCALC the tinal part of your program ;taking inputs from R5 ;and returning result F in R7 MainLoop jmp Mainloop Infinite Loop MULT ;Included in the skeleton code [2] for Main Program - [1] XCALC, [1] FCALC [5] for Factorial Subroutine [5] for Multiplication Subroutine

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!