Write a assembly language subroutine, Assembly Language

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;
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.

Posted Date: 4/1/2013 1:27:20 AM | Location : United States

Related Discussions:- Write a assembly language subroutine, Assignment Help, Ask Question on Write a assembly language subroutine, Get Answer, Expert's Help, Write a assembly language subroutine Discussions

Write discussion on Write a assembly language subroutine
Your posts are moderated
Related Questions
Interrupt Priority Management The interrupt priority management logic indicated in given figure can be implemented in several ways. It does not required to be present in system

LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF movwf PORTB end .

Hand shaking : Handshaking, or 2-way handshaking, is 1 type of strobe operation. It typically involves 2 handshaking lines: an output line to denote when the board is ready an

• To develop an assembly language program to control a "simulated" intelligent domestic lighting system with the intention of deterring burglary. • To produce a schematic circuit d

8237 modes : Intel 8237 can be set to four different type of style of transfer: 1) Single - One transfer at a time,  it allow processor access to the bus between transfers

The real time System (RTS) : Calling the clock real-time is somewhat of a misnomer because it only shows the time setting it has been given. The RTC is the other half of chip

Display control 8279  provides  a  16  byte  display  memory  and  refresh  logic.  Every address in the display memory corresponds to a display unit with address zero represen

PC Bus and Interrupt System The PC Bus utilized a bus controller, address latches, and data transceivers (bidirectional data buffers). 1) Bus controller : ( Intel 8288 Bus

The Pentium   The next member of the Intel family of microprocessors was the Pentium, introduced in the year 1993. With the Pentium, Intel broke its custom of numeric model name

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