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
jenyasd209 [6]
3 years ago
11

Write an assembly language program with a loop and indexed addressing that calculates the sum of all the gaps between successive

array elements. The array elements are DWORDs, sequenced in non-decreasing order. For example, the array [0, 2, 5, 9, 10] has gaps 2, 3, 4, and 1, whose sum equals 10.
Computers and Technology
1 answer:
PSYCHO15rus [73]3 years ago
7 0

Answer:

Description: Write a MASM 32bit program with a loop and indexed addressing that calculates the sum of all thegaps between successive array elements. The array elements are doublewords, sequenced in nondecreasing order.

;Include Irvine32.inc file used with link library for 32 bit applications

.386

.model flat,stdcall

.stack 4096

ExitProcess proto,dwExitCode:dword

INCLUDE Irvine32.inc

.data

myArray DWORD 0,2,5,9,10

arrSize = ($-myArray)/TYPE myArray

gapArr DWORD arrSize-1 DUP(?)

sum DWORD ?

.code

main PROC

;Call the procedure

call Clrscr

;Initialize ESI pointer

mov esi, 0

mov ecx, arrSize

dec ecx

L1:

mov eax, myArray[esi+4]

sub eax, myArray[esi]

mov gapArr[esi], eax

inc esi

loop L1

;Calculate the sum of gaps between array elements

mov sum, 0

mov esi, 0

mov ecx, arrSize

dec ecx

;  move gapArr[esi] to a temporary register and then add that register value to sum

L2:

mov edx, gapArr[esi]  

add sum, edx

inc esi

loop L2

       INVOKE ExitProcess,0

main ENDP

END main

Explanation:

You might be interested in
Sabian que hay una violadora sexuar el nombre de usario es SASHENKAFASION me acaba de decir que hackio en donde vivo,mi nombre c
grin007 [14]
Gracias por avisar eres muy amable
4 0
3 years ago
While interoperability and unrestricted connectivity is an important trend in networking, the reality is that many diverse syste
iogann1982 [59]

Answer:

Middleware

Explanation:

In today's technology like networking, software development, web development, etc, there is a need for connectivity. The problem at hand is the variation of the tech brands which results in the difference in operating systems, applications, and connectivity protocols. This problem is solved with the introduction of Middleware.

Middleware is the solution to conflicting software applications, interconnectivity between various tech platforms. It promotes cross-platform interactions.

6 0
3 years ago
Select all statements that correctly describe the ramifications of important features supported by modern DBMS.
lara [203]

Answer:  

"Option b and Option d" is the correct option for this question.

Explanation:

In the database, datatype belongs to the information storage medium, which can hold a specific type of value. There are several data types, which is used in database like integer, character, series, floating-point and array numbers, and the rules, that give levels of security to information are known as a security constraints. It may be either developed as rules on integrity, mathematical formalism rules or schematic rules, and other choices were wrong which can be described as follows:

  • In option a, The asserts, which is in any exchange in a database, should only modify the information, that is effected in acceptable ways is called consistency, that's why it is wrong.
  • In option c, The validity and accuracy of the data in the database can not be ensured, that's why it is wrong.
3 0
3 years ago
____ is an iterative software development process that focuses on team productivity and delivers software best practices to all
cluponka [151]

Answer:

RUP

Explanation:

RUP or Rational Unified Process is an IBM's software that divides the development process in four phases. It was developed to work throughout the entire software development life cycle, it's adaptive.

I hope you find this information useful and interesting! Good luck!

5 0
3 years ago
PLC software does not typically fail or break​
nydimaria [60]

Answer:

Good to know

Explanation:

:)

7 0
3 years ago
Other questions:
  • You have a Nano Server named Nano1. Which cmdlet should you use to identify whether the DNS Server role is installed on Nano1
    12·1 answer
  • Selecting the option to control Widows and Orphans will prevent _________. A single line from appearing at the top or bottom of
    10·1 answer
  • You should use html elements instead of server controls when
    11·1 answer
  • What type of social engineering attack uses email to direct you to their their website where they claim you need to update/valid
    6·2 answers
  • Liz's meeting is scheduled to end at 9:30. It is 9:20 and team
    9·1 answer
  • I need to write a really simple python program to solve this issue. I have most of the program written but, when I run the secon
    8·1 answer
  • What is a function of Agile software development?<br>​
    7·1 answer
  • Explain mechanical computer ,electromechanical and electronic computer with example<br>​
    11·1 answer
  • The wildcard character * (asterisk/start) and ? (question mark) are the same and can be use interchangeably.
    6·1 answer
  • Write a list comprehension statement to generate a list of all pairs of odd posi
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!