1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
andreev551 [17]
2 years ago
10

Summing Three Arrays Write an assembly language subroutine that receives the offsets of three arrays, all of equal size. It adds

the second and third arrays to the values in the first array. When it returns, the first array has all new values. Write a test program in C/C++ that creates an array, passes it to the subroutine, and prints the contents of the first array.
Computers and Technology
1 answer:
Delvig [45]2 years ago
7 0

Answer:

SumThreeArrays PROC USES eax ebx esi,

  array1:PTR DWORD, array2:PTR DWORD,

  array3:PTR DWORD, arraySize:DWORD

  LOCAL sz:BYTE       ; local sz for jump

  mov sz, 4                   ; size of each iteration jump

  mov ecx, arraySize           ; set ecx to size of arrays for loop

L1:

  mov eax, arraySize           ; move array size into eax

  sub eax, ecx               ; subtract whats left

  mul sz                       ; multiply by 4 to know how much to jump  

  mov esi, array1               ; set esi to start of array 1

  mov ebx, [esi+eax]           ; move value of esi+jump into ebx

  mov esi, array2               ; set esi to start of array 2

  add ebx, [esi+eax]           ; add value of esi+jump to ebx

  mov esi, array3               ; set esi to start of array 3

  add ebx, [esi+eax]           ; add value of esi+jump to ebx

  mov esi, array1               ; set esi to start of array 1

  mov [esi+eax], ebx           ; move value of ebx into esi+jump

  LOOP L1

  ret

SumThreeArrays ENDP

END

Explanation:

The subroutine "SumThreeArrays" from the assembly language gets from memory three defined arrays from a C++ source code and extend the size of the first array with the values of the second and the third arrays.

You might be interested in
Review the given requirements using the checklist and discover possible problems with them. The following requirements are for a
KATRIN_1 [288]

Answer:

Redundancy

Req. 1 and Req. 3 are seemed to say the same thing. We need to remove the first sentence in Req. 1

Conflict and understandability

Req. 1 states that access is through web browser while Req. 4 states that access is via html. We have to re-write the Req. 3 to make it clear that users do not actually have to write directly html to communicate with the system.

Completeness

Req. 5 states that print out will “mainly” be documents. What else might be printed? What other inputs will be produced?

Either remove mainly or clarify other print out.

What version of html or web browser is assumed in Req. 1 and Req. 3?

Explanation:

5 0
3 years ago
5 of 10
DaniilM [7]

Answer:

what

Explanation:

3 0
2 years ago
Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If user
Sedbober [7]

Answer:

Replace /* Your solution goes here */ with:

cin>>matchValue;

numMatches = 0;

for (i = 0; i < userValues.size(); ++i) {

if(matchValue == userValues.at(i))

{

numMatches++;

}

}

Explanation:

This line gets input for matchValue

<em>cin>>matchValue; </em>

This line initializes numMatches to 0

<em>numMatches = 0; </em>

The following iteration checks for the number of matches (numMatches) of the matchValue

<em>for (i = 0; i < userValues.size(); ++i) { </em>

<em>if(matchValue == userValues.at(i)) </em>

<em>{ </em>

<em> numMatches++; </em>

<em>} </em>

<em>} </em>

<em>See Attachment for full source code</em>

Download cpp
3 0
3 years ago
A __________ search engine focuses on a specific subject.<br><br>answer : Specialized
natita [175]

Answer:

Specialized fr just want point lol

Explanation:

5 0
2 years ago
Random Pivot Selection: In the algorithm input elements are divided into groups of 5.
SSSSS [86.1K]

Answer:

A) The algorithm will work if they are divided into groups of 7

B ) If the groups of 3 are used they do not run in Linear time

Explanation:

ATTACHED TO THIS IS THE DETAILED PROVE OF  why the algorithm will work if they are divided into groups of 7 and also the prove that if groups of 3 are used they do not run in Linear time

3 0
3 years ago
Other questions:
  • When you are shopping online and finalizing your order, you usually fill in forms for your name, address, email, and payment met
    6·1 answer
  • What is tuple and attribute of a relation​
    11·1 answer
  • Which of the following was one of the first internet search engines? A. archie B. google C. Yahoo D.ask
    7·1 answer
  • Discuss advantages and disadvantages of Twisted Pair?
    6·1 answer
  • WILL DO A BRIANLY! Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands be
    12·1 answer
  • Which of these personal protective equipment items prevents injury from falling objects ?
    15·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • What is a device driver​
    13·2 answers
  • second question today 25 POINTS: What is the formula to balance a lever when both effort and resistance are present?
    14·1 answer
  • Use the drop-down menu to complete the steps for using the Goal Seek feature.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!