inline (reserved word)


 inline (reserved word)

Inline statements and directives allow you to insert machine code instructions directly into the code of a program or unit.


 inline ( data / data / ... data )


When used as a statement, the inline data elements are inserted directly in the code.

When used as a directive in a procedure or a function declaration, the inline data elements are inserted in the code each time the procedure or function is called.

An inline data element consists of a constant or variable identifier, optionally prefixed by a size specifier, < or >.

A variable identifier can be followed by + (plus) or - (minus) and a constant to specify an offset from the variable's address.

An inline element generates 1 byte of code if it is a constant within the range 0 and 255; otherwise, it generates one word.

You use the < and > operators to override the automatic size selection:

  < means always generate a byte
  > means always generate a word.


 (* "inline" statement *)
 procedure FillWord(var Dest; Count: Word; Data: Word);
     $C4/$7E/<Dest/    (* LES   DI,Dest[BP] *)
     $8B/$4E/<Count/   (* MOV   CX,Count[BP]*)
     $8B/$46/<Data/    (* MOV   AX,Data[BP] *)
     $FC/              (* CLD               *)
     $F3/$AB);         (* REP   STOSW       *)

See Also

Тэги: inline
| G+
Код для вставки: :: :: :: ::
Поделиться: // //