Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following tasks lead to the development of a single assembly language program with three functions. Work on the tasks in numerical order, only

The following tasks lead to the development of a single assembly language program with three functions. Work

The following tasks lead to the development of a single assembly language program with three functions. Work on the tasks in numerical order, only proceeding when the previous task is complete and accurate. 1. Convert the program written for problem 1 from Homework 6 into a function. The dividend is to be passed to the function in R1 (not initialized in the function) and the divisor in R2 (not initialized in the function). The quotient is to be returned in R0. The remainder may be ignored. 2. Write an assembly language program to read a list of charges from a recent trip to the grocery store into memory. The list of charges is itemized in a file named Hw7.txt. An example of the format of the list is shown below. $17.31, $00.99, $03.98, $36.42 The address of the Ascii filename is to be passed to the function in R1 (again, not initialized in the function) and the address of where the file contents should be written to in memory in R2 (yup, this should also not be initialized in the function). You may assume that the file contains no more than 100 characters. 3. Write an assembly language function to convert an Ascii number of the following format into the binary equivalent representing the equivalent number of pennies. For example, the cost shown below is equivalent to 1099 pennies, (44B)16 or (10001001011) 2. $10.99 4. Write an assembly language program to process a list of charges from a recent trip to the grocery store. The program should read the charges from a file using the function written for problem 2. Each charge should be converted to its binary equivalent using the function written in problem 3. The program should also calculate the subtotal of all charges, the appropriate California state tax (based on the current California state tax of 7.25%) using the function written in problem 1, and the final total. The subtotal, tax and final total are to be written to the standard output with informative text.

Step by Step Solution

3.49 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

To complete the tasks we need to write assembly language code for each task Heres a possible solutio... 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

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Programming questions