. Assembler instruction

Purpose

Invokes the GFA-BASIC 32 Inline Assembler

Syntax

. | Asm mnemonic destination, source

Description

The dot is a shortcut for the Asm keyword and invokes the inline assembler and can appear wherever a GFA-BASIC 32 statement is legal. It cannot appear by itself. It must be followed by an assembly instruction.

The assembler commands use the INTEL parameter sequence, for example:

. mov dest, source

The inline assembler lets you embed assembly-language instructions in your GFA-BASIC 32 programs. The inline assembler is built into the compiler. Inline assembly code can use any variable or function name that is in scope, so it is easy to integrate it with your program’s code.

Example

GetRegs

Print _EAX

. mov eax, 1

. inc eax

GetRegs

Print _EAX

The middle two lines can also be written like:

Asm mov eax, 1

Asm inc eax

Remarks

More about the inline assembler you'll find with Asm.

See Also

Asm

{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}