Mail Archives: djgpp/1996/07/02/10:45:28
Xref: | news2.mv.net comp.os.msdos.djgpp:5581
|
From: | Erik Bachmann <ebp AT dde DOT dk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Need help to get start with Djgpp V.2.0
|
Date: | Tue, 02 Jul 1996 15:02:01 +0200
|
Organization: | Dansk Data Elektronik A/S
|
Lines: | 41
|
Message-ID: | <31D91DC9.5FE0@dde.dk>
|
References: | <4r9thf$29u AT clark DOT zippo DOT com> <4ra2df$qv6 AT news DOT inc DOT net>
|
NNTP-Posting-Host: | ebp-pc.dde.dk
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Jeremy Nelson wrote:
>
>In article <4r9thf$29u AT clark DOT zippo DOT com>, <P.F.> wrote:
>>I am a novice in Djgpp, I tried to convert my Borland C++ program to it. Most
> >of the stuff was converted clean. But in protected mode, there's no such thing
> >as MK_FP function(I didn't have it), then how do I build a pointer from
> >two short integers?
>
> Generally, i find that building far pointers from short integers is not
> neccesary using a 32 bit flat memory model. Remember that djgpp does
> not use segmented memory, so the need to construct far pointers does not
> exist.
>
> Programming in djgpp is "more like" programming in unix then it is like
> programming in 16-bit dos. In a rough sort of way.
>
> jfn
OK - let's try again: How do you fake Borland's MK_FP ???
in dos.h:
#define MK_FP(seg,ofs) ((void _seg *)(seg) + (void near *)(ofs))
#define FP_SEG(fp) ((unsigned)(void _seg *)(void far *)(fp))
#define FP_OFF(fp) ((unsigned)(fp))
--
---------------------------------------------------------------
| | Dansk Data Elektronik A/S
__| __| __ Att.: Erik Bachmann
/ |/ |/__) Herlev Hovedgade 199
\__/\__/\__ DK-2730 Herlev, Denmark
_______ _______
(_) (_) Voice.: (+45) 44 53 92 00 | #|
| ::: | Fax...: (+45) 44 53 24 16 | DDE | E-mail:
|_____| Telex.: 35258 dde dk |_______| ebp AT dde DOT dk
---------------------------------------------------------------
- Raw text -