( Reverse and Array ) .. in Assembly language ? Answered
Hi everyone !
I just started studying the assembly language ..
I have this question in my assignment but I'm not sure if my answer is correct
I'm afraid that I didn't get the question very well -_-
so please help me guys
this is the question
Use a loop with indirect or indexed addressing to reverse "
the elements of an integer array. Do not copy the elements to another array.
Use the SIZEOF, TYPE and LENGTHOF operators to make the program.
and this is my answer
TITLE " question 3 - revese and array"
.model flat, stdcall
array dword 1, 2, 3, 4
mov ecx, 2
mov esi, 3
mov edi, 0
mov eax, array[esi * type array ]
xchg eax, array[edi]
mov array[esi * lengthof array ], eax
mov edi, type array
mov esi, 2
mov eax, array
mov ebx, array
mov ecx, array
mov edx, array
waiting for your help