Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:docs:fapi:dossubset [2021/08/20 04:32] – prokushev | en:docs:fapi:dossubset [2021/12/05 11:06] (current) – prokushev | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| This call is used to initialize a segment or to reset a reallocated segment for suballocation. | This call is used to initialize a segment or to reset a reallocated segment for suballocation. | ||
| - | ==Syntax== | + | ===== Syntax ===== |
| - | | + | <code c> |
| + | DosSubSet (SegSelector, | ||
| + | </ | ||
| - | ==Parameters== | + | ===== Parameters ===== |
| - | ;SegSelector (SEL) - input : Target data segment selector. | + | |
| - | ;Flags (USHORT) - input : | + | |
| - | 0 = Increasing the size of a segment already initialized. | + | |
| - | 1 = Initializing a segment. | + | |
| - | ;Size (USHORT) - input : Segment size in bytes. | + | |
| + | 1 = Initializing a segment. | ||
| + | |||
| + | * Size ([[USHORT]]) - input : Segment size in bytes. | ||
| + | |||
| + | ===== Return Code ===== | ||
| + | rc ([[USHORT]]) - return | ||
| - | ==Return Code== | ||
| - | rc (USHORT) - return | ||
| Return code descriptions are: | Return code descriptions are: | ||
| - | * 0 NO_ERROR | ||
| - | * 310 ERROR_DOSSUB_SHRINK | ||
| - | * 313 ERROR_DOSSUB_BADSIZE | ||
| - | * 314 ERROR_DOSSUB_BADFLAG | ||
| - | ==Remarks== | + | * 0 NO_ERROR |
| - | To initialize a segment for suballocation, | + | * 310 ERROR_DOSSUB_SHRINK |
| + | * 313 ERROR_DOSSUB_BADSIZE | ||
| + | * 314 ERROR_DOSSUB_BADFLAG | ||
| - | If a segment allocated by a DosAllocSeg call has already been set for suballocation, | + | ===== Remarks ===== |
| - | The size parameter should be a multiple of four bytes, or it is rounded up to a multiple of four. Note in DosSubSet, a size parameter of 0 indicates the segment is 64KB, while in DosSubAlloc and DosSubFree, a size parameter of 0 is an error. Other than this special case of 0 meaning 64KB, the minimum size that can be set is 12 bytes. | + | To initialize |
| - | ==Example Code== | + | If a segment allocated by a [[DosAllocSeg]] call has already been set for suballocation, |
| - | === C Binding=== | + | |
| - | <PRE> | + | The size parameter should be a multiple of four bytes, or it is rounded up to a multiple of four. Note in DosSubSet, a size parameter of 0 indicates the segment is 64KB, while in [[DosSubAlloc]] and [[DosSubFree]], |
| + | |||
| + | ===== Example Code ===== | ||
| + | |||
| + | ==== C Binding ==== | ||
| + | |||
| + | <code c> | ||
| #define INCL_DOSMEMMGR | #define INCL_DOSMEMMGR | ||
| Line 42: | Line 52: | ||
| USHORT | USHORT | ||
| - | </PRE> | + | </code> |
| - | ===MASM Binding=== | + | ==== MASM Binding ==== |
| - | <PRE> | + | |
| + | <code asm> | ||
| EXTRN DosSubSet: | EXTRN DosSubSet: | ||
| INCL_DOSMEMMGR | INCL_DOSMEMMGR | ||
| Line 53: | Line 64: | ||
| PUSH | PUSH | ||
| CALL | CALL | ||
| + | |||
| + | </ | ||
| Returns WORD | Returns WORD | ||
| - | </ | ||
| - | |||
| - | |||
| - | ====== Note ====== | + | ===== Note ===== |
| Text based on http:// | Text based on http:// | ||




