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

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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