www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/02/22:26:22

Xref: news2.mv.net comp.os.msdos.djgpp:3363
From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Accessing vars in asm..
Date: 2 May 1996 01:22:32 GMT
Organization: The National Capital FreeNet
Lines: 30
Sender: ao950 AT freenet5 DOT carleton DOT ca (Paul Derbyshire)
Message-ID: <4m92oo$j54@freenet-news.carleton.ca>
References: <4m7duj$fvk AT news DOT nevada DOT edu>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet5.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

GEORGE GAGHON (gaghon AT nevada DOT edu) writes:
> How does one access a variable from the asm command.  This example does 
> not want to link.
> 
> 	asm ( " .. code ..
> 		cmpw _cvariable, %%ax
> 		jz not_set
>                 .. mode code ..
> 	      "
> 	      : /* No Outputs */
> 	      : "a" (x) ...
> 	    );
> 
> I have used us all the registers available, and needed to compare the 
> contents of '_cvariable' to ax.
> 
> Thanks
> 
> Vince
>
I'm not sure but I *think* cvariable has to be global, i.e. defined
outside any function (and before the one where this bit of code is).


--
    .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
 -()  <  circles, and bark is not smooth, nor does lightning travel in a
    `*'  straight line."    ,------------------------------------------------
         -- B. Mandelbrot  |  Paul Derbyshire (PGD) ao950 AT freenet DOT carleton DOT ca

- Raw text -


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