Write a assembly language subroutine, Assembly Language

Assignment Help:

Write a M68000 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 as follows:

Sum = 0;

for(i = 0; i)
Sum = A[i] + Sum;
if(Sum is an EVEN number) then

B[i] = Sum;
 else
C[i] = Sum * A[i];
 end if
end for

In evaluating the expression Sum * A[i] you are NOT allowed to use the MULTU, or MULTS instructions, hence, you are to find another way to calculate this expression.

Main program along with data section is shown below. This program passes all the required parameters to subroutine MULSUM by pushing them on stack.

Note: There is no overflow occurring during any operation.

a) Write the main program

b) Write the subroutine MULSUM

c) Show the stack frame for entire program and clearly label SP at different stages of program.


Related Discussions:- Write a assembly language subroutine

8254 programmable timer-microprocessor, 8254 Programmable Timer A diagr...

8254 Programmable Timer A diagram of Intel's 8254 interval event/timer counter is given in Figure. The 8254 consists of 3 identical counting circuits, per of which has GATE and

Help with assemly language assignment, Will be needing help with assembly l...

Will be needing help with assembly language assignments over the course of 4 weeks

8255 programmable peripheral interface-microprocessor, 8255 Programmable Pe...

8255 Programmable Peripheral Interface Intel's 8255 A programmable peripheral interface provides a nice instance of a parallel  interface. As shown the interface have a control

External system bus architecture-microprocessor, External System Bus Archit...

External System Bus Architecture : This is a 16 bit processor with 40 pins. It has twenty address pins and out of which sixteen are utilized as data pins. This concept of by us

Add-arithmetic instruction-microprocessor, ADD:  Add :- This instruction ...

ADD:  Add :- This instruction adds an immediate contents of a memory location specified in the a register ( source ) or instruction to the contents of another register (destinat

Dec-micro processor, DEC : A powerful new Alpha 64 bit RISC computer ch...

DEC : A powerful new Alpha 64 bit RISC computer chip was introduced in the year 1977, as new VAX (Virtual Address Extension) Computer. The VAX was 32 bit computer line based on

Matrix addition, how to write the alp for matrix addition in microprocessor...

how to write the alp for matrix addition in microprocessor 8086?

Rep-string manipulation instruction-microprocessor, REP : Repeat Instructi...

REP : Repeat Instruction Prefix :- This instruction is utilized as a prefix to other instructions. The instruction in which the REP prefix is provided, is executed repetitively

Project, I need some guidance on which project to make in assembly language...

I need some guidance on which project to make in assembly language

Introduction to 80 x 86 assembly language, Using the windows32 framework, w...

Using the windows32 framework, write a complete 80x86 program for Programming Exercises 4.3 number 3, on pages 130-131 of the textbook. Follow all coding conventions mentioned in

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