[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosGetHugeShift()             Get left shift count to apply to 1 to get huge selector increment value.
------------------------------------------------------------------------------

 Function : Get the left shift count to apply to 1 to get the huge selector
            increment value.

 Syntax   : USHORT BLXAPI DosGetHugeShift(PUSHORT shiftcount);

 shiftcount Pointer to an integer to receive the huge shift value.

 Return   : Left-shift count integer.

 The huge increment value is obtained by applying the left-shift count
 returned by this function to1. For example, a left-shift count of 3 gives a
 huge increment of 8 (1 << 3 == 8). This increment is added to the base
 selector returned by DosAllocHuge() to give the next consecutive selector
 for a huge memory block.

 Example:

    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <blx286.h>
    void main (void)
    {
    USHORT      shiftcount;
    int         increment;
    /* Get the huge shift count */
    if (DosGetHugeShift(&shiftcount) != 0);
       {
       printf("DosGetHugeShift() failed\n");
       exit(255);
       }
    increment = 1 << shiftcount;
    printf("Huge shift : %04X\n",shiftcount);
    printf("Huge increment : %04X\n",increment);
    }

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson