[fpc-other] asm ... end;
Tomas Hajny
XHajT03 at mbox.vol.cz
Wed Apr 16 20:34:16 CEST 2008
On Wed, April 16, 2008 20:00, Alain Michaud wrote:
> Hi,
>
> here is a simple stupid question for experienced programmers:
>
> When using the inline assembler instructions (asm), one can chose the
> "intel" or "ATT" syntax. Which one is the best, more convenient?
Trying to focus on objective factors (without any ranking - you need to
decide on their weight for you):
- AT&T syntax is available on more platforms as far as I know.
- AT&T syntax is more explicit on e.g. size of operands (you sometimes
need to guess that from context with Intel syntax).
- Intel syntax may be better alternative if you need to consider
interoperability with e.g. Delphi or some other Pascal compilers on x86
platform.
- Considering that majority of Pascal programmers these days have some
background with either TP/BP, Delphi or one of their clones (and these
usually only support Intel syntax), there are probably more Pascal
programmers who understand / prefer Intel syntax.
- If specifically targetting x86 platforms, I believe that there's more
documentation available for Intel syntax too (including reference and
optimization documents directly from CPU producers).
Tomas
More information about the fpc-other
mailing list