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

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of ax register

Hold Response Sequence The HOLD pin is examined at leading edge of each clock pulse. If it is received active line by the processor before T4 of the earlier cycle/during the T1

LABEL :   The Label directive which is used to assign a name to the current content of the location counter. At the beginning of the assembly process, the assembler start a loca

Intel 8259 interrupt controller :  The 8088 processor has only two interrupt control inputs, and interrupt request (INTR) and non mask able interrupt (NMI). NMI are interrupts t

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

Internal Architecture of Microprocessor : The architecture of 8086 provides a number of improvements over 8085 architecture. It supports a, a set of 16-bit registers ,16-bit AL

ADC: Add with Carry:- This instruction performs the similar operation a like ADD instruction, but adds the carry flag bit (which might be set as a result of the previous calculatio

• To develop an assembly language program to control a "simulated" intelligent domestic lighting system with the intention of deterring burglary. • To produce a schematic circuit d

8088  Timing System Diagram The 8088 address/data  bus is divided  in 3 parts (a) the lower 8 address/data  bits, (b) the middle 8 address bits, and (c) the upper 4 status/