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> dosrealtoprot()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosRealToProt()
------------------------------------------------------------------------------
 Purpose:
 Get a protected mode pointer corresponding to a real mode pointer.

 Syntax:
 Void __far * BLXAPI DosRealToProt(REALPTR rmptr);

 Parameters:
 rmptr  Real mode pointer.

 Returns:
 A protected mode pointer.

 Description:
 DosRealToProt() returns a protected mode pointer corresponding to a real
 mode pointer.

 Example:
 #include <stdio.h>                                                          
 #include <blx286.h>                                                         
                                                                             
 void main(void)                                                             
 {                                                                           
 void *fp;                                                                   
 REALPTR rmptr;                                                              
                                                                             
 fp = DosRealToProt ((REALPTR) MK_FP (0x40,0));                              
 if (fp == NULL)                                                             
    printf ("Unable to map pointer to BIOS data area");                      
 else                                                                        
    {                                                                        
    printf ("PM pointer to BIOS data area : %p\n\n",fp);                     
    if ((rmptr = DosProtToReal(fp)) == NULL)                                 
       printf ("Pointer was in extended memory");                            
    else                                                                     
       printf ("RM pointer to BIOS data area : %p\n\n", rmptr);              
    }                                                                        
 }                                                                           

See Also: DosProtToReal()

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