From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP stack when calling a function? Please help. Date: Sun, 13 Apr 1997 08:32:24 -0400 Organization: Cornell University http://www.cornell.edu Lines: 25 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <3350D258.1E78@cornell.edu> References: <19970413111500 DOT HAA07345 AT ladder01 DOT news DOT aol DOT com> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: cu-dialup-0066.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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/ \ ~/ *******************************************************************