Mail Archives: djgpp/1998/08/23/00:12:37
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
- Raw text -