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
Control Transfer or Branching Instruction Control transfer instructions transfer the flow of execution of the program to a new address specified in the instruction indirectly o

CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a

#Write a function to calculate the following arithmetic operation and return the result. A = 2 + (3x)3 + y/2n (x, y and n are arguments of the function where x is an integer in the

I/O interface I/O  devices such as displays and keyboards  establish  communication of computer with outside world. Devices may be interfaced in 2 ways Memory mapped I/O and I/

DW : Define Word:- The DW directive serves the same purposes as the DB directive, but now it makes the assembler  which reserves thenumber ofmemory words (16-bit) instead of by

ALP to preform of two 16-bit numbers in register addressing mode

Write a procedure to read a text file and copy its contents to another text file using 8086 assembly language .

SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c

Program : Write an assembly program to find out the number of positive numbers and negative numbers from a given series of signed numbers. Solution : Take the i th num

Request a depreciation of the item, year of purchase, cost of item, number of years to be depreciated (estimated life ) and,the method of depreciation . Method of depreciation sh