Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Assembly Expert

prepare a M68000 assembly language subroutine MULSUM which takes an array named A containing n bytes of positive numbers, and fills two arrays, array B having n words and array C containing n long words as follows:

Sum = 0;
for(i = 0; iSum = A[i] + Sum;
if(Sum is an EVEN number) then
B[i] = Sum;
else
C[i] = Sum * A[i];
 end if
end for

In calculating the expression Sum * A[i] you are NOT allowed to use the MULTU, or MULTS instructions, therefore, you are to find another way to compute this expression.  Main program along with data section is shown below. This program passes all the needed parameters to subroutine MULSUM by pushing them on stack.
Note: There is no overflow occurring during any operation.

i) prepare the main program
ii) prepare the subroutine MULSUM
iii) Show the stack frame for complete program and clearly label SP at different stages of program.

Assembly, Programming

  • Category:- Assembly
  • Reference No.:- M9381

Have any Question? 


Related Questions in Assembly

1write build and run an assembly language program that

1. Write, build, and run an assembly language program that displays 0 through 9 on the screen. You can only use the following data segment: message BYTE "0",13,10,0 2. Write an Assembly Language program that will write o ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate