The CODE Statement

The CODE statement defines the default attributes for all code segments within the application or DLL. The SEGMENTS statement can override this default for one or more specific segments.

Summary: Syntax

CODE [[attribute...]]

Summary: Remarks

This statement accepts several optional attribute fields: discard, executeonly, load, movable, and shared. Each can appear once, in any order. These fields are described in “CODE, DATA, and SEGMENTS Attributes” on page 246.

Summary: Example

The following example sets defaults for the program's code segments. All code segments in the program are loaded when the program starts and can only be executed.

CODE EXECUTEONLY PRELOAD