Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Prologue Imagine a messenger service which delivers high - valued cargo to paying customers most of whom are hospitals and urgent care medical facilities. One

Prologue
Imagine a messenger service which delivers high-valued cargo to paying customers most of
whom are hospitals and urgent care medical facilities. One heavily serviced route goes from
Fullerton to Santa Ana from there to Long Beach, and finally returns to Fullerton. The driver of
the delivery van may select the physical streets The distance from the delivery service
headquarters in Fullerton to the first customer in Santa Ana depends on the route selected by
the driver of that day. A similar statement can be said for the route from Santa Ana to Long
Beach. We want an assembly program that will compute the average speed of the delivery van
for the entire trip.
Requirements
Make a hybrid program with the main module in C language and the computational module in
X86 modern assembly language. The structure adheres to the basic diagram shown below.
Definitions
The program of Assignment 1 is the set of three modules represented by three rectangles in the
above diagram. The arrow points to a module that will be called by the earlier module.
For us in this class each module contains the source code of one function. In general
programming a module may contain multiple functions.
The language of the file r.sh is bash, witch is sometime written Bash.
Driver
l
Average
r.sh
h
Dialogue
When you are testing your program it should produce output like the following. We call the
output the dialog because the human user and the machine are communicating with each other.
Welcome to maintained by
Please enter your first and last names: Linda Garcia
Please enter your title such as Lieutenant, Chief, Mr, Ms, Influencer, Chairman, Freshman,
Foreman, Project Leader, etc: Vice-president
Thank you Vice-president Linda Garcia
Enter the number of miles traveled from Fullerton to Santa Ana: 15.7
Enter your average speed during that leg of the trip: 42.6
Enter the number of miles traveled from Santa Ana to Long Beach: 19.2
Enter your average speed during that leg of the trip: 53.9
Enter the number of miles traveled from Long Beach to Fullerton: 28.2
Enter your average speed during that leg of the trip: 64.9
The inputted data are being processed
The total distance traveled is 63.10000000 miles.
The time of the trip is 1.15927445 hours
The average speed during this trip is 54.43059661 mph.
The driver has received this number 54.43059661 and will keep it for future use.
Have a great day.
A zero will be sent to the operating system as a signal of a successful execution.
Color codes:
Yellow: driver function
Pink: average function
Green: user inputs
There are no integers in this program. All the numbers are floating point numbers stored in the
component of the CPU called SSE. Do not use any registers from the FPU component.
Notice that in the color scheme above main is not part of the algorithm that solves problem
presented in this document. The color scheme shows that main only performs a welcome
message and a good-bye message. This is a requirement.
The output from your program must match the output shown above in every character except
the numbers, which will be different. Main function does know anything about the problem being
solved by the assembly function.
All float number must be displayed with 8 decimal digits on the right of the point.

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions