delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/18/11:45:46

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: ASM
Date: Tue, 18 Aug 1998 11:36:44 -0300
Organization: NBTel Internet
Lines: 24
Message-ID: <35D9917C.E3FD9686@unb.ca>
NNTP-Posting-Host: fctnts13c42.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

    Is there any way to load a variable into a register without putting it
in the 'input registers' section?

int add(int a, int b)
{
 int Ret;
 asm ("movl ?a?, %%eax;"
      "addl ?b?, %%eax;"
      : : "=a" (Ret): "%eax");
 return Ret;

    Do I have to tell it I killed eax when it was used as an output
register?


--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




- Raw text -


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