Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Microprocessors: MUST BE IN MSP430 LANGUAGE! Please include comments. 120]3) Implement the following arithmetic function using subroutines and develop the code to be as etficient

Microprocessors: MUST BE IN MSP430 LANGUAGE! Please include comments. image text in transcribed
image text in transcribed
120]3) Implement the following arithmetic function using subroutines and develop the code to be as etficient 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 X+50 F=( ) where X-T20 !) 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 cir R5 clr R6 cir R7 clear the entire register clear the entire register clear the entire register CLEAR ithe X calculation part of your program taking value of R4 as an input and returning result x in R5 XCALC . ithe final part of your program itaking inputs from R5 and returning result F in R7 FCALC MainLoop jmp Mainloop Infinite Loop MULT Included in the skeleton code 12] for Main Program - [1] XCALC, [1] FCALC [5] for Factorial Subroutine [S] for Multiplication Subroutine

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

4. I can tell when team members dont mean what they say.

Answered: 1 week ago

Question

2. How were various roles filled?

Answered: 1 week ago