Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Write an assembly program that first initializes two 16-bit signed integers, Items and Cost. This program will be responsible for passing data to the

a) Write an assembly program that first initializes two 16-bit signed integers, Items and Cost. This program will be responsible for passing data to the two subroutines created in part b and part c of this assignment.
b) Create a subroutine, called SW_COST, that determines the total price of a customers order by multiplying the number of items by the cost per item. You may use the multiplication technique of your choice (some algorithm examples can be found here:
http://en.wikipedia.org/wiki/Multiplication_algorithm). The parameters (Items and Cost) should be passed to the subroutine using registers and the result stored in R12.
c) Create a second subroutine, called HW_COST, that determines the cost of a customers order using the hardware multiplier. The parameters (Items and Cost) should be passed to the subroutine using the stack and the result should be stored in R14.
d) Assess the performance of the subroutines by monitoring the clock cycle counter in the IAR Workbench for both subroutines. Include these clock cycle counts as part of your lab submission.

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

g. What types of roles did women have in the show?

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago