Skip to content

Compiler Option Asm

Paul Squires edited this page Oct 14, 2026 · 3 revisions

Home › Compiler Option: -asm

Compiler Option: -asm

Set assembler format for inline assembly under -gen gcc

Syntax

-asm < format >

Parameters

format

The assembler format: intel or att

Description

The -asm compiler option sets the assembler format for inline Asm blocks when using -gen gcc.

Dim a As Long = 1

Print a

Asm

    inc dword Ptr [a]

End Asm

Print a
Dim a As Long = 1

Print a

Asm

    "incl %0\n" : "+m" (a) : :

End Asm

Print a

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

See also


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally