Message-ID: <3743B4E7.12663C12@go.ro> Date: Thu, 20 May 1999 10:08:23 +0300 From: Radu Georgescu aka skoola X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: problem with extended inline asm References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com > > the static and the automatic variables are located in memory one next to > > another, if they are declared so > > This is simply not true. Static variables go to the data section > while automatic variables are on the stack. So they could be > megabytes apart. You can easily verify that by taking an address of a > variable and printing it. you didn't understand what i'm talking about. you have to know the address of one static variable and then you can address the others using the following model: static short a,b; asm(" mov 2+%0,%%ax " : :"g"(a)); and you get mov b,ax if both a and b are automatic variables, you may also do this stuff but there should be -2+%0 instead 2+%0 ,IMHO