FP_SEG()                 Get or Set Segment Portion of a Far Pointer (Macro)
 
 #include   <dos.h>
 
 unsigned   FP_SEG(longptr);
 far        *longptr;                    Long pointer to memory address
 
    FP_SEG() is a macro that can be used to get or set the segment
    portion of the far pointer 'longptr'.
 
    Returns:    An unsigned integer value representing a segment address.
 
      Notes:    FP_SEG() is a macro.
 
  -------------------------------- Example ---------------------------------
 
    The following example gets the segment portion of a far pointer and
    increments it to the next paragraph.
 
         #include <dos.h>
 
         char far *ptr;
         unsigned int seg_val;
 
         main()
         {
              seg_val = FP_SEG(ptr);
              FP_SEG(ptr) = seg_val + 16;
         }

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster