Write an assembly language program to fi nd the maximum, Assembly Language

Write an assembly language program to find the maximum of:

y = x6 - 14x2 + 56x

for the range -2 ≤ x ≤ 4, by stepping one by one through the range. The program should include a macro de nition for xmax to be %l2, where xmax will be the value of x in the range above that results in the maximum value for y. Also de ne ymax to be %l3, where ymax is the maximum output obtained with input xmax. At the end of your code, after the values for xmax and ymax have been determined, place a label called done. This will be the label used to set a breakpoint with gdb for the TA to test your code. Also, make sure to de ne the values of the coecients 14 and 56 as constants a1 and a2 the TA may change these values to further test your code.

Try to eliminate as many nop instructions as possible and also try to minimize the length of your code. Run the program using gdb to verify correctness. Make sure to pay close attention to the requirements above.

Requirements:

1. Follow the requirements as described above.

2. Name your source le lastname3.m which is the le to submit. [It is a .m le rather than a .s le since you will have macro de nitions.]

3. To expand the macros and to create the .s assembly code le, run: m4 lastname3.m > lastname3.s

 

Posted Date: 3/19/2013 1:37:07 AM | Location : United States







Related Discussions:- Write an assembly language program to fi nd the maximum, Assignment Help, Ask Question on Write an assembly language program to fi nd the maximum, Get Answer, Expert's Help, Write an assembly language program to fi nd the maximum Discussions

Write discussion on Write an assembly language program to fi nd the maximum
Your posts are moderated
Related Questions
IRET : Return from ISR:- When an interrupt service routine is called, before transferring control to it, the IP, CS  register and flag registers are stored in the stack to ment

1- Write an assembly program that:   a- Defines an array of 10 (word type)elements;   b- Finds out the number of negative elements   c- Calculate the summation of the posi

NASM assembly language program: Consider a sequence of 19 strictly positive decimal digits, most likely stored in an array. There are obviously duplicates, and the sequence is un

AAA: ASCII Adjust after Addition operation the AAA instruction is executed after an ADD instruction that adds 2 ASCII coded operands to give a byte of outcome in the AL. The AAA i

How to print strings in Right Triangle form?

OR: Logical OR: The OR instruction carries out the OR operation in the similar way as described in case of the AND operation. The restriction on source and destination operands ar

Your assignment for this project is to write an assembly language program that checks if the user's input is a valid ISBN number. A sample run of your program might look like:

I was wondering if you guys could offer me some advice and help on how to proceed - not answers- for a homework problem I am attempting. I am currently working on a "bomb" project

2. Write a program to separate out positive and negative numbers from a given series of 16-bit hexadecimal numbers.

SEG : Segment of a Label:- The SEG operator is which is used to decide the segment address of the, variable, label or procedure and substitutes the segment base address in plac