X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Martin Str|mberg Subject: Re: the reciprocal of MK_FP Newsgroups: comp.os.msdos.djgpp References: User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha)) Message-ID: <1019390657.729348@queeg.ludd.luth.se> Cache-Post-Path: queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: 21 Apr 2002 12:04:17 GMT Lines: 34 NNTP-Posting-Date: 21 Apr 2002 12:04:17 GMT NNTP-Posting-Host: queeg.ludd.luth.se X-Trace: 1019390657 news.luth.se 286 130.240.16.109 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jacky Luk wrote: : "Jacky Luk" :> I found out inside the FAQ that the Macro MK_FP in djgpp can accomplish a :> pointer conversion. But what about the reciprocal of that? : I actually meant FP_SEG and FP_OFF. You are in protected mode, so these questions don't make much sense. :> ^ :> |_____________ did i spell it right? Yes, I think so. But English isn't my first language. :> #include :> #include :> :> void * MK_FP (unsigned short seg, unsigned short ofs) :> { :> if ( !(_crt0_startup_flags & _CRT0_FLAG_NEARPTR) ) :> if (!__djgpp_nearptr_enable ()) I strongly suggest you use another method than __djgpp_nearptr_enable() as if you use it you just threw away all the protection DJGPP offers you. Read the sections in the FAQ about interfacing with DOZE (I can't give you the section number as I haven't got my WINDOZE box up) and ask if there's something there that needs clarification. Right, MartinS