X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Jacky Luk" 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: References: 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" 撰寫於郵件新聞 :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 > #include > > 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 > (玩得興師傅) > > ICQ:140681957 > Messenger:luckiejacky AT hotmail DOT com > http://home.netvigator.com/~luckie > luckie AT netvigator DOT com > luckiejacky AT hotmail DOT com > > >