This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
This call returns a shift count used to derive the selectors that address memory allocated with DosAllocHuge.
DosGetHugeShift (ShiftCount)
Each segment of a huge memory allocation has a unique selector. To compute the next sequential selector in a huge memory area, take the value 1, shift it left by the number of bits specified in shift count. Use the resulting value as an increment to add to the previous selector (using the selector returned by DosAllocHuge as the first selector). For example:
#define INCL_DOSMEMMGR USHORT rc = DosGetHugeShift(ShiftCount); PUSHORT ShiftCount; /* Shift Count (returned) */ USHORT rc; /* return code */
EXTRN DosGetHugeShift:FAR INCL_DOSMEMMGR EQU 1 PUSH@ WORD ShiftCount ;Shift Count (returned) CALL DosGetHugeShift Returns WORD
Text based on http://www.edm2.com/index.php/DosGetHugeShift