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]
3 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]3 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
Just a smol question how do i change my username on this?
strojnjashka [21]

Answer:

If you want to change your username, you have to contact them and tell them that you want to change. That is the only way.

Explanation:

7 0
3 years ago
Read 2 more answers
What is also known as a visual aid in a presentation?
kap26 [50]

Answer:

Option D i.e., slide are the correct option.

Explanation:

The following option is true because in the PowerPoint presentation slide is the visual aid. With the help of the visual aid, the user can add the acumen to its PowerPoint presentation and it is the item in which the user can summarize their information and data that is slide. It is important for the creation of the official or the business purpose presentation.

3 0
4 years ago
Read 2 more answers
To create an identical version of a slide you would click
Tresset [83]
You would click clone
3 0
4 years ago
Read 2 more answers
What are some good editing software apps for pc?
Anettt [7]

Answer:

If you have the money, buy Adobe Premiere Pro and Adobe After Effects (which is usually used in post-production).

If you need free ones many websites say Filmora, OpenShot, and Lightworks but I've used Filmora before and it's alright.

6 0
3 years ago
What is the database used for
ELEN [110]
Sometimes referred to as database management systems<span>, database software tools are primarily used for storing, modifying, extracting, and searching for information within a database. </span>
7 0
3 years ago
Other questions:
  • You want to arrange 6 of your favorite CD's along a shelf. How many different ways can you arrange the CD's assuming that the or
    15·1 answer
  • Bit rate is a measure of how many bits of data are transmitted per second. Compared to videos with a higher bit rate, the same v
    13·1 answer
  • Which type of view is created from the following SQL statement? CREATE VIEW balancedue AS SELECT customer#, order#, SUM(quantity
    15·1 answer
  • What to do when you strip a screw
    10·2 answers
  • In an inspection, usually the first thing an inspector will want to see is:
    14·2 answers
  • Florida law requires every child blank years of age or younger use a crash tested federally be approved child restraint device
    5·2 answers
  • Which of the following happens when you enter the formula =G15 into a cell?
    12·1 answer
  • Parts of a Computer
    13·2 answers
  • on early ethernet networks, all computers were connected to a single wire, forcing them to take turns on a local area network (l
    6·1 answer
  • By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!