Mail Archives: djgpp/1997/04/13/19:53:59
nitehawk91 AT aol DOT com wrote:
> 2. Pointer access problem :
> assume I have char string[] = {'h','e','l','l','o'};
> In C I could access the 'e' for example with string[1] or *(string+1).
> How can I make this in Nasm ?
> I have declared [EXTERN _string]
> Tried to access the 'e' with mov eax,[_string+1]
> This doesn't work also. Why ?
exactly what do you mean by it doesn't work? i have not programmed in
assembly at all (so what the hell am i doing replying to this? ;-) but
could it be that you are getting four bytes, starting with _string+1 in
eax?
-- Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
*******************************************************************
- Raw text -