Question: ASSEMBLY LANGUAGE For this progra m you will rev erse the contents of an array. The initial array is: array DWORD 1,5,6,8,0Ah,1Bh,1Eh,22h,2Ah,32h Your program will
For this program you will reverse the contents of an array.
The initial array is: array DWORD 1,5,6,8,0Ah,1Bh,1Eh,22h,2Ah,32h
Your program will have 3 loops.
Loop 1 will write out the contents of the non-reversed array. It will use WriteString, where the address of the string goes in ecx, WriteDec where the unsigned integer of each array element goes in eax, and WriteChar where the character goes in al. (The character is the space character between the integers)
Loop 2 MUST loop for LENGTHOF array / 2 and used the XCHG instruction.
Loop 3 will write out the contents of the reversed array using similar code to Loop 1.
In the .code section, the only constants appearing are 0 or 2.
The output of the program is:
The non-reversed array content is: 1 5 6 8 10 27 30 34 42 50
The reversed array content is: 50 42 34 30 27 10 8 6 5 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
