| delorie.com/archives/browse.cgi | search |
| 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: | the reciprocal of MK_FP |
| Date: | Sun, 21 Apr 2002 19:08:35 +0800 |
| Organization: | IMS Netvigator |
| Lines: | 34 |
| Message-ID: | <a9u6sc$av82@imsp212.netvigator.com> |
| NNTP-Posting-Host: | pcd448225.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 |
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?
^
|_____________ 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |