createSeg segName, logName, align, combine, class
The createSeg macro creates a new segment that has the specified name and segment attributes. The macro automatically creates an assumes macro and an OFFSET macro for the new segment. This macro is intended to be used in medium-model Windows applications to define nonresident segments.
segName
Specifies the actual name of the segment. This name is passed to the linker.
logName
Specifies the logical name of the segment. This name is used in all subsequent sBegin, sEnd, and assumes macros that refer to the segment.
align
Specifies the alignment type. This parameter can be one of the following types: BYTE, WORD, PARA, and PAGE.
combine
Specifies the combine type for the segment. This parameter can be one of the following types: COMMON, MEMORY, PUBLIC, and STACK.
If no combine type is given, a private segment is assumed.
class
Specifies the class name of the segment. The class name defines the segments that must be loaded in consecutive memory.
The Cmacros have two predefined segments, CODE and DATA, that any application can use without special definition. Medium-, large-, and huge-model applications can define additional segments by using the createSeg macro.
The following example demonstrates the usage of the createSeg macro:
createSeg _INIT,INITCODE,BYTE,PUBLIC,CODE
sBegin INITCODE
assumes CS:INITCODE
mov ax,initcodeOFFSET sample
sEnd INITCODE