Assembly Language Arrays

Question!

This is a pretty simple question.. lets say I have the following.

wordArray WORD 810Dh, 0C064h, 93ABh

Now, if I do this...

MOVZX EAX, wordArray

Thats going to move the first value of the array onto EAX.. so EAX would look something like this.. 0000810D. My question is, how can I move ALL of the array onto EAX.. so EAX would look like this... 810DC06493AB .. I think. Is this possible?



Answers

First of all, EAX only holds 32 bits, so at most it would only hold two of the elements. What you want to do in this case is to use the regular MOV instruction:

MOV EAX, dword ptr wordArray.

This will put 32 bits starting from the offset at wordArray into EAX.



This video can help you solving your question :)
By: admin