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_fromlong http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                             _farptr_fromlong

   Usage
   #include <dos.h>
   void far *_farptr_fromlong(long value);

   Description
   _farptr_fromlong converts from a long to a normalized far pointer. The
   long is taken to be a linear address from 0.

   Example
   #include <stdio.h>
   #include <dos.h>
   main()
   {
   void far *pin, far *pout;
   long value;
        value = 0xB7543;
        pout = _farptr_fromlong(value);
        printf("Converting 0x%lX to a far pointer should be"
                  " B754:0003,\nit actually is %lp\n", value,pout);
   }

   Return Value
   _farptr_fromlong returns the normalized far pointer.


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