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

Div-idiv-arithmetic instruction-microprocessor, DIV: Unsigned Division:- T...

DIV: Unsigned Division:- This instruction performs unsigned division operation. It divides an unsigned word or double word by a 16-bit or 8-bit operand. The dividend might be in t

Lds/les instruction execution-microprocessor, LDS/LES Instruction execution...

LDS/LES Instruction execution :  LAHF : Load AH from Lower Byte of Flag: - This instruction loads the AH register with the lower byte of the flag register. This instruction ca

Arithmrtic operation exercise assempley HELP!, Open notepad and enter the c...

Open notepad and enter the code for a program that calculates the following arithmetic expression: x = a + b + c - d - e + f The operands a, b, c, d, e, f, and x should be declared

Digital and embedded software, hi!im looking for someone who expert in an a...

hi!im looking for someone who expert in an assembly language and help me write the programmed!Thank you

Assembly assignment help, Problems: 1. Write a single program. Each of th...

Problems: 1. Write a single program. Each of the problems (2-4) should be written within a procedure. Your “main” procedure should call each procedure. Before calling each proc

Not-logical instruction-microprocessor, NOT : Logical Invert: The NOT inst...

NOT : Logical Invert: The NOT instruction complements (inverts) the contents of an a memory location or operand register bit by bit. The instance are as following: Example :

LAB homework, 1. Write a program that calculates the Fibonacci series: 1, 1...

1. Write a program that calculates the Fibonacci series: 1, 1, 2, 3, 5, 8, 13, ….. (Except for the first two numbers in the sequence, each number is the sum of the preceding two n

Dma controller-microprocessor, DMA controller :     Steps in...

DMA controller :     Steps include in transferring a block of data from I/O devices (for example a disk) to memory: 1. CPU sends a signal to initiate disk transfe

Project, Any small project which can implement on any software. No need any...

Any small project which can implement on any software. No need any external hardware approach.

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