Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> dosgethugeshift()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosGetHugeShift()
------------------------------------------------------------------------------
 Purpose:
 Get the left shift count to apply to 1 to get the huge selector increment
 value.

 Syntax:
 USHORT BLXAPI DosGetHugeShift(PUSHORT shiftcount);

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

 Returns:
 Left-shift count integer.

 Description:
 The huge increment value is obtained by applying the left-shift count
 returned by this function to 1. 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);                                
 }                                                                           

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson