delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/02/09:18:59

From: LEGER Patrick <leger_v AT bluewin DOT ch>
Newsgroups: comp.os.msdos.djgpp
Subject: global variable
Date: Sun, 02 Nov 1997 11:04:48 +0100
Organization: Unisource Business Networks
Lines: 17
Message-ID: <345C5040.4627@bluewin.ch>
NNTP-Posting-Host: sio22pub70.bluewin.ch
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Here's a sample code :

static int t;
...
void function(int x)
{
  asm("pusha
       movw $_x,%eax
       popa");
}
After that the compiler say that "x" is unknown.
But if I load x in t as static and globale variable and put it into %eax
, the program runs.
Is there a method to use directly the argument without load them in a
globale variable ?

thanx

- Raw text -


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