Sign in Join
FPDoc Onlineexperiment

Using Assembly language

Free Pascalsupports inserting assembler statements in between Pascal code. The mechanism for this is the same as under Turbo Pascaland Delphi. There are, however some substantial differences, as will be explained in the following sections.

  1. Using assembler in the sourcesThere are essentially 2 ways to embed assembly code in the pascal source. The first one is the simplest, by using an asm block: Var I : Integer; begin I:=3; asm
  2. Intel 80x86 Inline assemblerIntel syntax Free Pascalsupports Intel syntax for the Intel family of Ix86 processors in its asm blocks. The Intel syntax in your asm block is converted to AT&T
  3. Motorola 680x0 Inline assemblerThe inline assembler reader for the Motorola 680x0 family of processors uses the Motorola Assembler syntax (q.v). A few differences do exist: Local labels start
  4. Signaling changed registersWhen the compiler uses variables, it sometimes stores them, or the result of some calculations, in the processor registers. If you insert assembler code in your

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.