Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Computer Architecture and Assembly Language Programming Assignment

Objectives:

1) Designing, implementing, and calling low-level I/O procedures
2) Implementing and using a macro

Problem Definition:

• Implement and test your own ReadVal and WriteVal procedures for unsigned integers.

• Implement macros getString and displayString. The macros may use Irvine's ReadString to get input from the user, and WriteString to display output.

o getString should display a prompt, then get the user's keyboard input into a memory location

o displayString should print the string which is stored in a specified memory location.

o readVal should invoke the getString macro to get the user's string of digits. It should then convert the digit string to numeric, while validating the user's input.

o writeVal should convert a numeric value to a string of digits, and invoke the displayString macro to produce the output.

• Write a small test program that gets 10 valid integers from the user and stores the numeric values in an array. The program then displays the integers, their sum, and their average.

Requirements:

1) User's numeric input must be validated the hard way: Read the user's input as a string, and convert the string to numeric form. If the user enters non-digits or the number is too large for 32-bit registers, an error message should be displayed and the number should be discarded.

2) Conversion routines must appropriately use the lodsb and/or stosb operators.

3) All procedure parameters must be passed on the system stack.

4) Addresses of prompts, identifying strings, and other memory locations should be passed by address to the macros.

5) Used registers must be saved and restored by the called procedures and macros.

6) The stack must be "cleaned up" by the called procedure.

7) The usual requirements regarding documentation, readability, user-friendliness, etc., apply.

8) Submit your text code file (.asm) to Canvas by the due date.

Notes:

1) For this assignment you are allowed to assume that the total sum of the numbers will fit inside a 32 bit register.

2) When displaying the average, you may round down to the nearest integer. For example if the sum of the 10 numbers is 3568 you may display the average as 356.

1) Number each line of user input and display a running subtotal of the user's numbers.
2) Handle signed integers.
3) Make your ReadVal and WriteVal procedures recursive.
4) Implement procedures ReadVal and WriteVal for floating point values, using the FPU.

To ensure you receive credit for any extra credit options you did, you must add one print statement to your program output PER EXTRA CREDIT which describes the extra credit you chose to work on. You will not receive extra credit points unless you do this. The statement must be formatted as follows...

--Program Intro--
**EC: DESCRIPTION

--Program prompts, etc.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92743901

Have any Question?


Related Questions in Computer Engineering

Describe the difference in economic profit between a

Describe the difference in economic profit between a competitive firm and a monopolist in both the short and long run. Which should take longer to reach the long-run equilibrium?

Question 1 the facilities coordinator is a critical role

Question: 1. The facilities coordinator is a critical role. Put yourself in the position of the facilities coordinator. 2. Determine and list the qualities you have that would make you an excellent candidate for this pos ...

At a certain temperature this reaction establishes an

At a certain temperature, this reaction establishes an equilibrium with the given equilibrium constant, Kc. Kc = 1.53 * 10^21 3A (g) + 2B (g) ------> 4C(g) If, at this temperature, 1.50 mol of A and 4.00 mol of B are pla ...

Question cyber attacks on critical infrastructures-a risk

Question: Cyber Attacks On Critical Infrastructures-A Risk To The Nation There has been a great deal of research related to cyber attacks and vulnerabilities and critical infrastructure, but there is an incomplete unders ...

Explain the differences between working in the web based

Explain the differences between working in the web based version of Outlook in Office 365 to the desktop application version of Outlook.

Imagine you are employed by a large city police department

Imagine you are employed by a large city police department as the leader of the digital forensics division. A large corporation in the city has contacted the police for assistance in investigating its concerns that the c ...

In some states allow requires drivers to turn on their

In some states allow requires drivers to turn on their headlights when driving in the rain. A highway patrol officer believes that lesson one-quarter of all the drivers follow this rule. As a test, he randomly samples 20 ...

Cullumber inc has issued a three-year bond that pays a

Cullumber, Inc., has issued a three-year bond that pays a coupon rate of 7.3 percent. Coupon payments are made semiannually. Given the market rate of interest of 4.4 percent, what is the market value of the bond?  (Round ...

Hydrogen sulfide h2s a toxic gas redolent of sewage and

Hydrogen sulfide (H2S), a toxic gas redolent of sewage and rotten eggs, is prepared from hydrochloric acid and sodium sulfide by this reaction: 2HCl(aq) + Na2S(aq) → H2S(g) + 2NaCl(aq). Determine the percent yield if 3.7 ...

Question suppose that you are searching an unsorted array

Question : Suppose that you are searching an unsorted array of objects that might contain duplicates. Devise an algorithm that returns a list of the indices of all objects in the array that match a given object. If the d ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As