Assembly language program to accept positive integer values

Assignment Help Assembly Language
Reference no: EM13859752

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.

Reference no: EM13859752

Questions Cloud

Create a complete hi-fidelity prototype using fluid-ui : Create an application that demonstrates competence at using lists and create a sketch, and refine it further to create a hi-fi prototype. Undertake a heuristic usability on this hi-fi prototype.
How you might improve the jobs of your employees : You are the sole supervisor of this large group. Using the job characteristics model (JCM), describe how you might improve the jobs of your employees in order to improve motivation, performance, and job satisfaction
Calculate the rate of return on a price weighted average : Calculate the rate of return on a price weighted average of the four stocks for the period December 31, 2000 to December 31, 2001. Remember to adjust for changes in the divisor.
What is appreciative inquiry : What is appreciative inquiry
Assembly language program to accept positive integer values : 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
Audit of bullseye - comprehensive plan : Create a comprehensive plan, in essay form, for your audit of Bullseye, from establishing the scope of the audit through issuing the final report -  Bullseye has been a client for several years, this is an ongoing audit, so you only need to be con..
What would be the pros and cons of developing a business : What would be the pros and cons of developing a business plan for your new venture?
Corporation had total liabilities : Company had total assets of $200,000, total liabilities of $110,000, and shareholders' equity of $90,000 at the beginning of the year. For the year, Company earned net income of $75,000 and declared cash dividends of $30,000. At the end of the yea..
What are your views about the correctional system : What are your views about the correctional system? Do you feel it's needed? Explain why or why not? Do you feel that rehabilitation programs are needed? If so, which program do you feel is the most effective? Which program do you feel is the least..

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine mulsum that takes an

create a assembly language subroutine mulsum that takes an array named a containing n bytes of positive numbers and

  Write assembley langusge program to evalute

Write Assembley Langusge program to evalute: 3A+ (B + 5C) 4 +C where A=25, B=30, C=10

  Write a mips assembly language program

write a MIPS assembly language program that can be loaded and executed using the MARS simulator.

  Register address machine

Express the statement X= (A*B)-(C*D)-E in the assembly language of each of 0- memory address machine, 3-register address machine with 3 registers R1,R2,R3, and 2-memory-register-address machine with three registers R1,R2, R3. Your solution should use..

  Write a complete well documented assembly language

write a complete well documented assembly language program (starts at $C000) that counts the number of 1s in each byte in a list. The LIST_IN starts at $C100 and it has 12 bytes ( create your own random bytes for the list). The results (count of 1s) ..

  Accept two 1-digit numbers (from 0 to 9) from the keyboard

Write an assembly language program that will accept two 1-digit numbers (from 0 to 9) from the keyboard, compare the two numbers, and then print out th enumber of greatest value

  Write a mips assembly language program

Write a MIPS assembly language program that prompts for a user to enter a series of floating point numbers and calls read_float to read in numbers and store them in an array. Then the program should display the array content on the console window. Th..

  Write an arm assembly program

Write an ARM assembly program that prints all the integers greater than 0 and less than 1000 that not divisible by 5.

  How the expression is written in postfix notation

Describe the Floating Point Unit data stack and describe how the expression is written in postfix notation

  1 write a function in linux assembly that evaluates the

1. write a function in linux assembly that evaluates the length of a string called mystrlen. the function needs to take

  Nonrecursive factorialwrite a nonrecursive version of the

nonrecursive factorialwrite a nonrecursive version of the factorial procedure that uses a loop. a wdeonote for this

  Draw a flow chart for this

Draw a Flow Chart for this 8051 assembly language program below. This program calculate y=x^2+ 2x+9. Register R0 has the x, and at the end of the program R2 should have y. (Test program for x=9).

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