Comments: Authenticated sender is From: "George Foot" To: Endlisnis Date: Sun, 23 Aug 1998 05:10:53 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: ASM Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Message-Id: Precedence: bulk On 22 Aug 98 at 23:31, Endlisnis wrote: > Nate Eldredge wrote: > > > > Is there any way to load a variable into a register without putting it > > > in the 'input registers' section? > > Yes, just as you describe. > > int main(){ > int T=9; > asm("movl T, %eax"); > } > > How can I make that program compile. How can I load 'T' into %eax without > using input registers. You have to ask gcc to load it for you, because there's no guarrantee that `T' has a place in memory. It might for instance be stored in a register throughout its useful life. You can only load global variables directly; prefix the variable's name with an underline. Why don't you want to use input registers? -- george DOT foot AT merton DOT oxford DOT ac DOT uk