www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/13/19:53:59

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
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
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/     \  ~/ 
*******************************************************************


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019