Reference no: EM132244822
Create a program in an assembly that calculates the amount of arithmetic progression from 1 to n with step 1.
• The parameter and the numbers to be returned, are no sign, so positive.
• In case of errors or incorrect input data, must return 0.
• Error analysis is done by the assembly program, and C program prints everything returned by the assembly, including error codes.
The number n is given as a parameter. Develop and tender:
1. Makefile - file that allows you to compile your program
2. md1.h source code file with a feature prototype that will be included in C, and will implement the assembly code.
3. md1.s - program in an assembly that calculates the amount of arithmetic progression.
4. md1_main.c - program in the language C that calls the assembly program and gives to it parameter n and receives the result printed on the screen.
When testing, the parameter n should be passed from the command line.
So, you will have to create program main () in md1_main.c, which receives the parameter via argv [1], transforms it into int integer. This number should be given as a parameter for asum () implemented in the assembly code, in the file md1.s.
The result must returned to C program and printed, for example, with printf () function. You only need to print the number and the line end symbol 'n'.
It is essential to stick to the prototype of such a function so that it is unified with the interface as used by the testing programs.
Attachment:- arithmetic progression.rar
What are key questions organizational development
: What are key questions Organizational Development Psychologists should asking during the contracting phase and during the project phase?
|
Research a topic in corporate finance
: Research a topic in corporate finance. Objective is for the student to gain an in-depth knowledge of a topic related to the course.
|
Explain why you chose the particular educational strategy
: Explain why you chose the particular educational strategy. Why is it an effective strategy for the population? Describe cultural barriers to disease prevention.
|
How to choose a leadership pattern
: "The Management Grid", "How to choose a Leadership Pattern", "Leadership Decision Making" and "One Minute Management"
|
Calculates the amount of arithmetic progression
: Create a program in an assembly that calculates the amount of arithmetic progression from 1 to n with step 1 - unified with the interface as used by the testing
|
How to organize the department
: What jobs will be central to the department? How will they be designed? Propose an organizational chart that depicts the roles in the reorganization.
|
Intangible costs and intangible benefits
: To solve an inventory problem for NIKE, what are the Tangible Costs, Tangible Benefits, Intangible Costs and Intangible Benefits?
|
Intangible costs and intangible benefits
: To solve an inventory problem for NIKE, what are the Tangible Costs, Tangible Benefits, Intangible Costs and Intangible Benefits?
|
Calculate the over-applied or under-applied overhead
: Calculate the additions to the work-in-process inventory account for the direct material used, direct labor, and manufacturing overhead.
|