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
ROR : Rotate Right without Carry: This instruction rotates the contents of destination operand to the bit-wise right either by one or by the count specified in register CL, exclud

I need to estimate the value of a definite integral using Riemann Sums and For our estimation let f(x) = x2 ,a=0, b=10 and n=5. Where a is the lower bound, b is the upper bound and

Instruction Formats A machine language instruction format has 1 or more number of fields linked with it. The first field is known as operation code field or op code field, whic

Queue Operation :   RQ/CT0, RQ/G1-Request/Grant:   These pins are utilized by other local bus masters, in themaximum mode, to force the processor to release the loca

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

INT N : Interrupt Type N:- In the interrupt structure of 8086/8088, 256 interrupts are distinct equivalent to the types from OOH to FFH. When an instruction INT N is executed,

1. Start your program at address $8500. To do this you need to inform the assembler, through the EQU and ORG assembler directives, that you want your program to start at $8500. Thi

You have been hired by the Elbonian government to write an Assembly program to help its workforce determine how much their tax will be. The tax laws in Elbonian are very simple. Th

DQ:   Define  Quad word:-  This directive is taken in use to direct the assembler to reserve 4 words (8 bytes) of memory for the specified variable and can initialise it having

Trying to convert small programs from C to 8086 assembly language using emu 8086 emulator. I converted to low level C, but struggling with converting to the Assembly language.