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
Any game suggestions for nintindo switch.​
alexira [117]

Answer: animal crossing lol

Explanation:

7 0
3 years ago
I GOT A 65% LAST TIME AND IM DOING RETAKE! PLEASE DONT FAIL ME THIS TIME
yawa3891 [41]

Answer:

Explanation: c vecause am pro

4 0
3 years ago
Read 2 more answers
We discussed in class the differences between Ruby and a language like Java. Based on our discussions, when do you feel it would
EleoNora [17]

Answer:

Ruby

It’s not a secret that our company places a bet on this interpreted scripting language created by Yukihiro Matsumoto in the far 1995. A bunch of deep-rooted technologies like Smalltalk, Python, Perl, Ada, C++, and others had an impact on shaping Ruby’s syntax and features. As a result, we got a technology known for elegant and expressive coding, as well as increased flexibility and productivity of development. It means that engineers take pleasure in writing code with Ruby and are not restricted in their vision on how to execute one thing or another.

Java

Despite Railsware’s unhidden preference towards Matsumoto’s brainchild, Java is also a part of our team’s arsenal. For example, we leveraged it together with other technologies within the Philips Directlife project. That’s to say, we know both of them and are happy to use whichever language best suits the task at hand.

In a sign of numerous Java and Ruby differences to be described a bit later, there is one undisputed similarity – they were born in the same year. Nevertheless, since then, Java has come through 11 versions with Java SE 11 as the latest one (compared to the Ruby’s latest release of 2.6.0). The technologies that influenced the creation of Java include C++, Ada 83, Object Pascal and others.

The TIOBE index shows that this compiled programming language overcame C in ranking and holds the first position as of the end of 2018. Moreover, it is a primary technology for Android native app development, which by the way was recently enhanced with Kotlin. Another facet of Java is that it is also an ecosystem of tools including Java Development Kit (JDK) for writing/running/compiling Java code, Java Virtual Machine (JVM) for running software built with Java and JVM languages within the same infrastructure to some degree of interoperability (for example, Kotlin for expressiveness and conciseness, Scala for functional programming, etc.), and Java Runtime Environment (JRE) for running Java apps. The basic points why developers opt for this technology are its reliability, platform independence, and ease of use.

Explanation:

The readers of our blog have already had a chance to get to know the duel of Ruby vs. PHP, as well as the combat Python vs. Ruby vs. Node.js. Today, we have Java vs. Ruby in turn.

Traditionally, we’re going to look at both technologies from a product owner’s perspective, which means learning not only technical differences between the languages, but also their actual use across different projects. Here we go.

Warm-up

Before any competition, the contestants need to warm up. It also happens that this term is used by one of the wrestlers, Java, for the lazy class loading of Java Virtual Machine. So, let’s not step out of line and have the competitors spiffed up to the battle.

Ruby

It’s not a secret that our company places a bet on this interpreted scripting language created by Yukihiro Matsumoto in the far 1995. A bunch of deep-rooted technologies like Smalltalk, Python, Perl, Ada, C++, and others had an impact on shaping Ruby’s syntax and features. As a result, we got a technology known for elegant and expressive coding, as well as increased flexibility and productivity of development. It means that engineers take pleasure in writing code with Ruby and are not restricted in their vision on how to execute one thing or another.

At the same time, this technology cannot be called popular. According to the TIOBE index as of December 2018, it is ranked 17th. Nevertheless, the language is not dying and keep afloat with the 3.0 version expected to be released in 2020. To sum up, Ruby allows programmers to enjoy what they do and be productive at once by following the principle of least astonishment.

Ruby key features

Apart from comparing Ruby to Java, let’s take a look at some key things one should know about this gem of a language.

Open-source

Interpreted language

Multi-platform

Dynamic + duck typing

Has a smart garbage collector

Everything including methods, numbers and variable is an object

You can embed Ruby into HTML

High scalability

Applicable for writing CGIs, building web and intranet apps

Support of different GUI tools including OpenGL, Tcl/Tk, and GTK

Support of Sybase, Oracle, MySQL, and DB2 connection

4 0
4 years ago
What are the cons of using keyboard shortcuts?
Yanka [14]

Answer:

Mistakes can easily occur while using them.

4 0
3 years ago
for number in range(1,51): if number % 3 == 0 and number % 5 == 0: print('XY') elif number % 5 == 0: print('X') elif number % 3
Elza [17]

Output of the given code is:

Y

X

Y

Y

X

Y

XY

Y

X

Y

Y

X

Y

XY

Y

X

Y

Y

X

Y

XY

Y

X

Explanation:

In the for loop variable "number" will iterate from 1 to 150(inclusive).

in the "if" condition it is checking that the number is divisible by 3 and 5 both if the number is divisible by both 3 & 5 then it will print XY as output.

In the first "elif", if the number is divisible by 5 only then it will print X

as output.And in the last "elif", if number is divisible by 3 only then it will

print Y as output. Nothing will be printed if all three conditions are FALSE.

7 0
4 years ago
Other questions:
  • Is a display, or monitor, considered a piece of computer hardware
    15·1 answer
  • Which of the following is NOT contained on the Slide Show toolbar?
    13·1 answer
  • What is most likely kept in as database
    15·1 answer
  • False when you tap or click the ‘decrease font size’ button, excel assigns the next lowest font size in the font size gallery to
    13·1 answer
  • Why are file naming conventions essential
    13·2 answers
  • Untuk memberikan keterangan pada bagian bawah halaman dokumen yg akan diulangi pada setiap halaman dokumen yg digunakan fasilita
    8·2 answers
  • Retail products are identified by their Universal Product Codes (UPCs). The most commonform of a UPC has 12 decimal digits: The
    8·1 answer
  • Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost
    5·1 answer
  • Questlon 5 of 25
    5·1 answer
  • John has recently retired from an administrative, yet technical job which he held for 40 years. He decided to pursue a life-long
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!