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
Program : Write a program to perform a one byte BCD addition. Solution : It is consider that the operands are in BCD form, but the CPU considers it as hexadecimal and acco

code to add two matrices

Perform an extensive web search of popular microcontroller manufacturers (some of the major players) to select a suitable device for the system to control the lighting of a typical

Write a 32-bit program which when run, allows the user to select from a menu: (1)    Enter a Binary Number (2)    Enter a Decimal Number (3)    Enter a Hexadecimal Number


Program: Write a program to perform addition of a series of 8-bit numbers. The series have 100 (numbers). Solution : In the first program, we have been implemented the add

Introduction to Microprocessor: Microprocessor works like a CPU in a microcomputer. It's present as a single IC chip in a microcomputer. Microprocessor is the soul of the machi

need some project ideas

i have trying to do the homework but there is a mistake. (Counting positive and negative numbers and computing the average of numbers) write a program that reads an unspecified nu

GROUP : Group the Related Segments:- The directive which is used to form logical groups of segments with same purpose or type. This isused to inform the assembler to form a log