IPB

> inline (reserved word)
Форум
Загрузка...
 
Час быка
Час быка
Карта Интернета
Internet Map
Яндекс.Метрика

Language:
Русский
English

 inline (reserved word)


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

Syntax

 inline ( data / data / ... data )

Remarks

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.

Example

 (* "inline" statement *)
 procedure FillWord(var Dest; Count: Word; Data: Word);
 begin
   inline(
     $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       *)
 end;

See Also

 
 К началу страницы 
Тэги: inline
 

Код для вставки: :: :: :: ГОСТ ::
Поделиться: //
 


-
Хостинг предоставлен компанией "Веб Сервис Центр" при поддержке компании "ДокЛаб"