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
What is stand-alone LDAP server?
FinnZ [79.3K]

Answer:

A stand-alone LDAP server is defined as to remove the load from a server that does multi function tasks. It is more efficient when we use one or more LDAP configurations .

Light weight Directory Access Protocol (LDAP) is a client and server protocol used for accessing directory data. It  helps in reading and editing the directories over IP networks and runs directly over Transmission control protocol and internet protocol used simple string format for transferring of data.

8 0
3 years ago
How do you start using the Internet?
fgiga [73]

Answer:

it's

D. open web browser

3 0
3 years ago
Read 2 more answers
What is a peripheral device?
saul85 [17]

Answer:

a peripheral device is a device used to put information into as well as get information out of a computer

Explanation:

4 0
3 years ago
A firewall, when properly implemented, can prevent most attacks on your system.
siniylev [52]
A. it is true
all the best
4 0
3 years ago
List and write at least t computer languages codes
miv72 [106K]
Cobol and python it's some other let me think
3 0
3 years ago
Read 2 more answers
Other questions:
  • What type of network does not have centralized control, such as one in a small office or home office?
    5·1 answer
  • The algorithm ADDN implements N-bit fixed-width binary addition for non-negative integers and ignores overflows. For example, AD
    13·1 answer
  • What specific database stores local user accounts on local computers, and allows users to sign in to and access resources only o
    9·1 answer
  • The new ICH E6(R2) integrated addendum requires sponsors to implement systems to manage quality throughout all stages of the tri
    13·1 answer
  • Describe a new career in computer science that may be created in the future. Include supporting evidence in your response that s
    13·1 answer
  • You are seeking a way to store computer files so you have backup copies anywhere you go.? Which one of the secondary storage typ
    11·1 answer
  • Consider a classful IPv4 address 200.200.200.200? What is its implied subnet mask? If we take the same address and append the CI
    12·1 answer
  • I'll give you Brainliest if you can tell me the name of this class and the name of the game, LOL
    9·1 answer
  • Which of the following security policies can be implemented to prevent removable media from automatically launching potentially
    7·1 answer
  • Add this in binary numbers . (1100011+11111+111) ​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!