[fpc-devel]problem in AT&T syntax assembler :(

Jonas Maebe jonas at zeus.rug.ac.be
Thu Jul 25 13:08:26 CEST 2002


On Thu, 25 Jul 2002, Michail A.Baikov wrote:

> I have INTEL variant of my code:
>
> {$ASMMODE INTEL}
> begin
> asm
>     add ecx, offset @@k
> @@k:
> end
> end.
>
> in disasm i get next code: add ecx, 00418440
>
> But, i need this code in AT&T syntax.
>
> I try write next code:
>
>  addl .Lk,%ecx
>
> but disasm get: add ecx, dword ptr [00418440]

You need

addl $.Lk,%ecx

The $ tells the assembler that you want the value OF the address and not
the value AT the address.


Jonas





More information about the fpc-devel mailing list