delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/23/01:03:29.1

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Jacky Luk" <luckie AT netvigator DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: the reciprocal of MK_FP
Date: Sun, 21 Apr 2002 19:14:02 +0800
Organization: IMS Netvigator
Lines: 42
Message-ID: <a9u76j$av21@imsp212.netvigator.com>
References: <a9u6sc$av82 AT imsp212 DOT netvigator DOT com>
NNTP-Posting-Host: pcd605200.netvigator.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Jacky Luk" <luckie AT netvigator DOT com> ¼¶¼g©ó¶l¥ó·s»D
:a9u6sc$av82 AT imsp212 DOT netvigator DOT com...
> 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.

> ^
> |_____________ did i spell it right?
> #include <sys/nearptr.h>
> #include <crt0.h>
>
>  void * MK_FP (unsigned short seg, unsigned short ofs)
>        {
>          if ( !(_crt0_startup_flags & _CRT0_FLAG_NEARPTR) )
>            if (!__djgpp_nearptr_enable ())
>              return (void *)0;
>          return (void *) (seg*16 + ofs + __djgpp_conventional_base);
>        }
>
>
> Thanks
>
> --
> ================================
> Always wear a grin on your face :)
> Ha ha ha ha ha.... ha ha ha ha ha... ha ha ha ha
>
> Mr. Jacky Luk
> (ª±±o¿³®v³Å)
>
> ICQ:140681957
> Messenger:luckiejacky AT hotmail DOT com
> http://home.netvigator.com/~luckie
> luckie AT netvigator DOT com
> luckiejacky AT hotmail DOT com
>
>
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019