Write a 68000 assembly language program to accept positive


OBJECTIVE

Learn to write a simple (non-recursive) subroutine and pass parameter by value. Use the TRAP instruction for input and output.

ASSIGNMENT

Write a 68000 assembly language program to accept positive integer values m, b, and x from the keyboard, compute the value of f using the formula,

f(m, b, x)= x2 + mx + b

and print the result on the screen. The computation off must occur in a SUBROUTINE and the input and output mutt be accomplished in the MAIN PROGRAM.

To pass information between the main program and the subroutine, use registers. Before calling the subroutine, copy the value m into register D4, b into register D5, and x into register D6. The subroutine will use the values it finds in D4, D5, and D6 to compute f, which it places into D7 before returning to the main program. Finally, the main program will display the value it finds in D7 as the result. It's a good idea use long words for all your data storage and calculations so the program can handle relatively large numbers.

Solution Preview :

Prepared by a verified Expert
Assembly Language: Write a 68000 assembly language program to accept positive
Reference No:- TGS01142515

Now Priced at $45 (50% Discount)

Recommended (93%)

Rated (4.5/5)