subject
Computers and Technology, 03.03.2020 23:55 mprjug6

Use a loop with indirect or indexed addressing to reverse the elements of an integer array in place. Do
not copy the elements to any other array. Use the SIZEOF, TYPE, and LENGTHOF 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.

My current code:

.data
array BYTE 10h, 20h, 30h, 40h
.code
main PROC
mov esi, 0
mov edi, 0
mov esi, OFFSET array + SIZEOF array - 1
mov edi, OFFSET array + SIZEOF array - 1
mov ecx, SIZEOF array/2

l1: mov al, [esi]
mov bl, [edi]
mov [edi], al
mov [esi], bl
inc esi
dec edi
LOOP l1

call DumpRegs
call DumpMem

exit

main ENDP

END main

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
You know the right answer?
Use a loop with indirect or indexed addressing to reverse the elements of an integer array in place....
Questions
question
Computers and Technology, 16.02.2021 20:10
question
Mathematics, 16.02.2021 20:10
question
Mathematics, 16.02.2021 20:10
question
Computers and Technology, 16.02.2021 20:10
question
Mathematics, 16.02.2021 20:10
question
Mathematics, 16.02.2021 20:10
question
Mathematics, 16.02.2021 20:10
Questions on the website: 13722360