www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/02/02:12:05

Date: Tue, 2 Jul 1996 09:07:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: P DOT F DOT AT delorie DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: Need help to get start with Djgpp V.2.0
In-Reply-To: <4r9thf$29u@clark.zippo.com>
Message-Id: <Pine.SUN.3.91.960702090523.18998G-100000@is>
Mime-Version: 1.0

On 1 Jul 1996 P DOT F DOT  AT delorie DOT com 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?

The follwing is an excerpt from the next version 2.1 of the DJGPP FAQ 
list (to be released in a few days):

Macros that create far pointers from the segment and offset (called usually
`MK_FP' or `_MK_FP') are mostly used in 16-bit code to access certain
absolute addresses on memory-mapped peripheral devices, like the video RAM.
These chores are done differently in DJGPP; the details are described in
accessing absolute addresses in Section 18.4, below.  You will need to
rewrite the code that uses these macros, so don't bother writing a
replacement for the macro itself.

Macros that extract the segment and the offset from a far pointer (called
`FP_SEG' and `FP_OFF') are required in 16-bit code to pass addresses in
registers when calling real-mode DOS or BIOS services, like functions of
interrupt 21h.  See How to call real-mode interrupt functions in Section
18.2, which describes how that should be done in DJGPP; here, too, you won't
need to port the above macros.

- Raw text -


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