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
Vitek1552 [10]
3 years ago
14

Use a loop with indirect or indexed addressing to reverse the elements of the integer array in place. Do not copy the elements t

o any other array. Use the SIZEOF, TYPEOF, and LENGHTOF operators to make the program as flexible as possible if the array size and type should be changed in the future. Optionally, you may display the modified array by calling the DumpMem method from the Irvine32 library.
Computers and Technology
1 answer:
finlep [7]3 years ago
4 0

Answer:

INCLUDE Irvine32.inc

.data

      ;declare and initialize an array

      array1 DWORD 10d,20d,30d,40d,50d,60d,70d,80d,90d

.code

main PROC

      ;assign esi value as 0

      mov esi,0

      ;find the size of array

      mov edi, (SIZEOF array1-TYPE array1)

      ;find the length of the array

      ;divide the length by 2 and assign to ecx

      mov ecx, LENGTHOF array1/2

;iterate a loop to reverse the array elements

L1:

      ;move the value of array at esi

      mov eax, array1[esi]

      ;exchange the values eax and value of array at edi

      xchg eax, array1[edi]

      ;move the eax value into the array at esi

      mov array1[esi], eax

      ;increment the value of esi

      add esi, TYPE array1

      ;decrement the value of edi

      sub edi, TYPE array1

      loop L1

;The below code is used to print

;the values of array after reversed.

      ;get the length of the array

      mov ecx, LENGTHOF array1

      ;get the address

      mov esi, OFFSET array1

L2:

      mov eax, [esi]

      ;print the value use either WriteDec or DumpMems

      ;call WriteDec

      ;call crlf

      call DumpMem

      ;increment the esi value

      add esi, TYPE array1

      LOOP L2

exit

main ENDP

END main

You might be interested in
13. Place where names, addresses and email information<br> is stored
yanalaym [24]

Answer in ur email

Explanation:

8 0
2 years ago
Where does the CPU store its computations
mario62 [17]

Answer:

In main memory

Explanation:

Hope this helps

8 0
3 years ago
Read 2 more answers
A web directory is a web page that conducts searches of the web to find the words or expressions that you enter? true or false.
Sav [38]
The answer to this is true! hope i helped!
4 0
3 years ago
14. If B3=10 and D5=8, what would the following function return? IF(B3&gt;D5, "Closed", D5-B3) *
kompoz [17]
IF function has three parts
IF (condition_to_check , return_if_true , return_if_false)

IF function first checks condition. If it is true it returns first result. Otherwise it returns second result.

Condition to check:
B3>D5
After inserting numbers we get:
10>8
This is correct so the first result will be returned.
The given IF function returns "Closed".
7 0
3 years ago
Please help, will give brainliest!!! I need help with these coding questions, any help is appreciated
olchik [2.2K]

Answer:

class Foo:

   def F(self, n):

       if n == 1:

           return 1

       return self.F(n - 1) + 3 * n - 2

Explanation:

This should cover part a to this question. The thing I'm not sure on is they use the term "method" which in python technically means a class function...but then list one argument with the function call which makes me think it is possibly just supposed to be a regular function. Which would be the following snippet. It would depend on if you are using classes or not yet in your coding class.

def F(n):

   if n == 1:

       return 1

   return F(n - 1) + 3 * n - 2

Play around with it and look into python "lists" and "for loops" for part c. Part b I'm not sure what kind of example they want since I'm not in that class. Good luck!

8 0
2 years ago
Other questions:
  • You are given a network of 10.50.24.0/21, which contains 2,048 addresses. what subnet mask should you use to divide this into fo
    7·1 answer
  • Which of the following is NOT one of the most important elements when designing a website?
    8·2 answers
  • The HR department of a company wants to send out an email informing its employees about an upcoming social event. Which email ap
    11·2 answers
  • Which of the following is a correct definition of the term rectification? A. Rectification is the opposition to current flow in
    14·2 answers
  • Senior executives at a global manufacturing company are determining the key performance indicators they'll use to judge how effe
    15·1 answer
  • Aside from human user types, there are non human user groups. Known as account types, __________ are implemented by the system t
    10·1 answer
  • (20points)
    6·1 answer
  • If the fluid level in a battery is below the separators<br> should be added but never add
    5·1 answer
  • Do small companies need computers? why?<br>​
    12·1 answer
  • An electronics company develops a line of augmented reality headsets for use in interactive 3d media applications using 5g mmwav
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!