Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - _farptr_norm http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                               _farptr_norm

   Usage
   #include <dos.h>
   void far *_farptr_norm(void far *ptr);

   Description
   _farptr_norm normalizes a far pointer. That is, it adjusts the segment
   and offset so that the offset is < 16.

   Example
   #include <stdio.h>
   #include <dos.h>
   main()
   {
   void far *pin, far *pout;
   long value;
        pin = MK_FP(0x1100,0x2678);
        pout = _farptr_norm(pin);
        printf("%lp normalized should be 1367:0008,"
                  " it actually is %lp\n", pin,pout);
   }

    Return Value
   _farptr_norm returns the normalized far pointer.


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