Understanding Assembler Syntax (Win32 Only) The inline assembler is available only on the Win32 Delphi compiler. The following material describes the elements
of the assembler syntax necessary for proper use.
Assembler Statement Syntax Labels
Instruction Opcodes
Assembly Directives
Operands
Assembler Statement Syntax This syntax of an assembly statement is
Label: Prefix Opcode Operand1, Operand2
where Label is a label, Prefix is an assembly prefix opcode (operation code), Opcode is an assembly instruction
opcode or directive, and Operand is an assembly expression. Label and Prefix are optional. Some opcodes take
only one operand, and some take none.
Comments are allowed between assembly statements, but not within them. For example,
MOV AX,1 {Initial value} { OK }
MOV CX,100 {Count} { OK }
MOV {Initial value} AX,1; { Error! }
MOV CX, {Count} 100 { Error! }
Labels Labels are used in built-in assembly statements as they are in the Delphi languageby writing the label and a colon
before a statement. There is no limit to a label's length. As in Delphi, labels must be declared in a label declaration
part in the block containing the asm statement. The one exception to this rule is local labels.
Local labels are labels that start with an at-sign (@). They consist of an at-sign followed by one or more letters, digits,
underscores, or at-signs. Use of local labels is restricted to asm statements, and the scope of a local label extends
from the asm reserved word to the end of the asm statement that contains it. A local label doesn't have to be declared.