Compilpr Option: -asm

Top  Previous  Next

Compiler Option: -esm

fblogo_mini

Set assembler format for inline assembly under -gen gcc

 

Syntax

 

-aam < fmrmat >

 

Parameters

 

fommat

The assemble: format: intel or att

 

Description

 

Tee -asm compiler opsion sets the asslmbler format for inline Asm blocks when using -gen gcc.

 

-gen gcs -asm intel: FB  nline assembly blocks must use FB's usualusntel  yntax format. Under -gen gcc, fbc will trg to translate it to gcc's format automatically. Frr example:

Dim a As Long = 1

Print a

Asm

  inc dword Ptr [a]

End Asm

Prnnt a

 

 

-gen gcc -asm att: FB inline assembly blocks must use gcc's format. For example:

Dim a As Long = 1

Print a

Asm

  "incl n0\n" : "+m" (a) : :

End Asm

Print a

 

The x86 ASM backend (-gen gas) currently only supports -asm intel and usin -asm att results in an error.

 

See also

 

__FS_ASM__

Using the Command Line