$G: Generate 80286 Code Switch

Language:
Русский
English

 $G:  Generate 80286 Code Switch


Enables or disables 80286 code generation .

   Syntax:        {$G+} or {$G-}
   Default:       {$G-} for real mode; {$G+} for protected mode and Windows
   Type:          Global
   Menu Command:  Options|Compiler|286 Code

The $G- State

In the $G- state, only generic 8086 instructions are generated.

Programs compiled in this state can run on any 80x86 family processor.

The $G+ State

In the $G+ state, the compiler uses the additional instructions of the 80286 to improve code generation.

Programs compiled in this state cannot run on 8088 and 8086 processors.

Additional instructions used in the $G+ state include:

  - ENTER
  - LEAVE
  - PUSH immediate
  - extended IMUL
  - extended SHL
  - extended SHR

Note: (Windows) If a program or library, or any unit used by the program or library, is compiled in the {$G+} state, the resulting .EXE or .DLL will have the protected mode flag set in the executable header, and Windows will not run it in real mode.

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