Defines a program segment called name having segment attributes
name SEGMENT [[READONLY]] [[align]] [[combine]] [[use]] [[characteristics]] ALIAS(string) [['class']] statements name ENDS
The range of memory addresses from which a starting address for the segment can be selected. The alignment type can be any one of the following:
Align Type Starting Address
Next available byte address.
Next available word address (2 bytes per word).
Next available double word address (4 bytes per double word).
Next available paragraph address (16 bytes per paragraph).
Next available page address (256 bytes per page).
Next available nth byte address. See Remarks section for more information.
If this parameter is not specified, PARA is used by default.
PUBLIC, STACK, COMMON, MEMORY, AT address, PRIVATE
USE16, USE32, FLAT
INFO, READ, WRITE, EXECUTE, SHARED, NOPAGE, NOCACHE, and DISCARD
These are supported for COFF only and correspond to the COFF section characteristics of similar name (for example, SHARED corresponds to IMAGE_SCN_MEM_SHARED). READ sets the IMAGE_SCN_MEM_READ flag. The obsolete READONLY flag caused the section to clear the IMG_SCN_MEM_WRITE flag. If any characteristics are set, the default characteristics are not used and only the programmer-specified flags are in effect.
- ALIAS( string )
This string is used as the section name in the emitted COFF object. Creates multiple sections with the same external name, with distinct MASM segment names.
Not supported with /omf.