| www.delorie.com/archives/browse.cgi | search | 
| From: | "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com> | 
| Newsgroups: | comp.os.msdos.djgpp | 
| Subject: | Re: assembler & C variables | 
| Date: | Mon, 4 May 1998 14:47:49 -0700 | 
| Organization: | Hewlett-Packard, Roseville | 
| Lines: | 15 | 
| Message-ID: | <6ild25$53f$1@rosenews.rose.hp.com> | 
| References: | <354DEBDA DOT 6612 AT rocketmail DOT com> | 
| NNTP-Posting-Host: | ros51675cra.rose.hp.com | 
| To: | djgpp AT delorie DOT com | 
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp | 
Xavi Cardona wrote in message <354DEBDA DOT 6612 AT rocketmail DOT com>...
>{char myvar =0;
myvar is a local variable.  It exists only as an offset into the stack (or
as a reg).  There will not be
a _myvar symbol equiavalent to it.
>__asm__ __volatile__ ("movb $10,_myvar"
This works if you make myvar a global.  Otherwise re-read the inline asm
docs about passing variables into it.
Andy
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |