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
what is the hex value in ax after executing the instructions ax= 1E8A bx=4080 add al,bl sub ah,bh

Using DEBUG DEBUG.COM is a DOS efficacy that facilitates the trouble-shooting and debugging of assembly language programs. In particular case of personal computers, all of th

Write a program to solve problem 9, Summation Program, on page 179 of chapter 5 in the textbook (book:kip Irvine Assembly Language sixth edition)

RCR: Rotate Right through Carry:- This instruction rotates the contents  bit-wise of the destination operand right by the specified count through carry flag (CF). For each operati

Write an assembly language program to perform a rot13 1 conversion on characters in a text file.  The program should read charatcers from the input file, perform the rot13 convers

How to define procedures?

Physical Memory Mapped I/O and Port I/O : CPU controlled I/O comes in 2 ways. Simply the difference is whether we utilize the normal memory addresses for I/O, this is mention


The Pentium Pro    Introduced in the year 1995, the Pentium Pro reflected  still  more  design  breakthroughs.  The Pentium Pro may process 3 instructions in a single clock cy

Addressing mode of 8086 : Addressing mode specify a way of locating operands or data. Depending on the data types used the memory  addressing  modes and in the instruction  ,