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> bliptrinc()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 BLIPTRINC()
------------------------------------------------------------------------------
 Purpose:
 Huge pointer increment.

 Syntax:
 LPVOID BLIPTRINC(LPPointer, niValue)

 Parameters:
 lpPointer  Memory pointer to increment.
 niValue    Value by which to increment pointer.

 Returns:
 Incremented pointer.

 Description:
 Some C/C++ compilers generate code using huge protected mode pointers
 quite happily (such as Borland C++ in most cases), while others generate
 references to __AHSHIFT and __AHINCR. These symbols are used to advance
 huge pointers over segment boundaries, and are provided in the compiler
 runtime library as constants that work correctly in real mode only. As
 it is impossible for Blinker to provide single values for these constants
 that will work in both real mode and protected mode, there are two possible
 solutions:

 1) BLXSHFPT.OBJ or BLXSHFTR.OBJ can be linked as a FILE to resolve these
 symbols with protected mode or real mode compatible values respectively, but
 the resulting .EXE will ONLY run correctly in the selected mode as the
 increments are hard coded for the appropriate mode.

 2) The code can be updated to use two Blinker functions BLIPTRINC() and
 BLIPTRDEC() to advance the pointers correctly in all modes, including dual
 mode.

 Example:
 For example if BLOCK is some complex type then :                            
                                                                             
 1  memptr = (BLOCK huge *) halloc ((long) BLKMAX,sizeof (BLOCK));           
 2  if (memptr)                                                              
 3     {                                                                     
 4     tmpptr = memptr;                                                      
 5     for (i = 0; i < BLKMAX; i++)                                          
 6        {                                                                  
 7        ...               /* Some                                          
 operation */                                                                
 8        tmpptr++;         /* Point to next                                 
 block */                                                                    
 9        }                                                                  
 10    }                                                                     
                                                                             
 Line 8 can be replaced with:                                                
                                                                             
 tmpptr = BLIPTRINC (tmpptr, (long) sizeof (BLOCK));                         

See Also: BLIPTRDEC()

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