Write an assembly language program to fi nd the maximum, Assembly Language

Assignment Help:

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

 


Related Discussions:- Write an assembly language program to fi nd the maximum

Write an assembly language program, You are to write an assembly language p...

You are to write an assembly language program called subfaq.s that computes the generalized subfactorial function of nonnegative integer inputs i0 and n. The generalized subfactori

General data registers-microprocessor, General Data Registers Given fig...

General Data Registers Given figure indicate the register organization of 8086. The registers DX, CX, BX and AX are the general purpose 16-bit registers. AX is behaved as 16-bi

Hashing, what is double hashing

what is double hashing

The pentium pro-micro processor, The Pentium Pro    Introduced in the ...

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

Linking a program-microprocessor, Linking a program The DOS linking pro...

Linking a program The DOS linking program LINK.EXE links the different object modules of function library routines and source program to produce an integrated executable code o

Bitwise logical and shift operations, Part A: Bitwise Logical and Shift Op...

Part A: Bitwise Logical and Shift Operations Create a SPARC assembly language program that extracts a bit-field from the contents of register %l0. The position of the rightmos

maximim and minimum mode 8088-microprocessor, Maximim and Minimum mode 808...

Maximim and Minimum mode 8088 system : In the maximum mode, the pin 880 is lastingly high. The functions and timings of other pins of 8088 are exactly similar to 8086. Due to t

Help with assemly language assignment, Will be needing help with assembly l...

Will be needing help with assembly language assignments over the course of 4 weeks

More Sentence Sense, When Seen in the choir, Terry was the picture of an an...

When Seen in the choir, Terry was the picture of an angelic devil. I have to underline the predicate twice

Addsub, Using the AddSub program from Ch3 under c:\Masm615\examples as a re...

Using the AddSub program from Ch3 under c:\Masm615\examples as a reference, write a program that subtracts three 16-bit integers using only registers. Insert a call DumpRegs statem

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd