From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: inline assembly syntax for accessing variables ? Date: 19 Dec 2002 13:26:18 GMT Organization: Ericsson Erisoft AB, Sweden Lines: 19 Message-ID: References: NNTP-Posting-Host: lws256.lu.erisoft.se X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Martin Stromberg (eplmst AT lu DOT erisoft DOT se) wrote: : : int a,b; : : a=4; : : b=8; : : asm ADD b,a : : this should result in b being 12 (a+b); : asm ("add %1, %0" : : "=r" (b) : : "r" (a) : ); I forgot to say that this is untested code. Right, MartinS