Mail Archives: djgpp/2001/09/01/07:45:24
This is a multi-part message in MIME format.
--------------73310BE8FB96BB02AF266908
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
"Cappellini, Tony" wrote:
> Would someone help me with the correct asm syntax for DJGPP for the
> following Intel format instructions
>
> mov AX, OFFSET count
> lea AX, count
>
> The gnu ASM docs are not very good for syntax examples.
>
> thanks for the help
>
> Tony
why do you want it?
use this code instead:
__asm__ __volatile__ (
"movl %0,%%eax\n\t"
"leal %1,%%eax\n\t"
:
: "g" ((int)&count),
"m" (count)
: "eax");
or if you just want raw AT&T syntax:
movl $count, %eax
leal count(,1), eax
Except this uses eax instead of ax (since gcc is 32bit). but why do you
want it? it's not like you'll able to do anything with eax. and why set
eax to the same value twice?
--------------73310BE8FB96BB02AF266908
Content-Type: text/x-vcard; charset=us-ascii;
name="jp_prongs.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Nick
Content-Disposition: attachment;
filename="jp_prongs.vcf"
begin:vcard
x-mozilla-html:FALSE
fn;quoted-printable:I set out To beg my food=3B But the time was spent Gathering violets In the fields of spring. -- Ryokan
n;quoted-printable:;I set out To beg my food=3B But the time was spent Gathering violets In the fields of spring. -- Ryokan
adr:;;;;;;
version:2.1
end:vcard
--------------73310BE8FB96BB02AF266908--
- Raw text -