The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Farabi on October 09, 2010, 11:14:54 PM

Title: Accesing array
Post by: Farabi on October 09, 2010, 11:14:54 PM
If I define 4 dword array, how do I access the forth element?
a[3] or a[12]?
Title: Re: Accesing array
Post by: Antariy on October 09, 2010, 11:23:18 PM
Quote from: Farabi on October 09, 2010, 11:14:54 PM
If I define 4 dword array, how do I access the forth element?
a[3] or a[12]?

a[12]

I.e.

...
some proc ....
LOCAL a[4]:DWORD
mov eax,dword ptr a[12] ; - get last DWORD from array
...




Alex
Title: Re: Accesing array
Post by: Farabi on October 10, 2010, 01:30:46 AM
Thanks alex  :U