Mail Archives: djgpp/1996/07/02/02:12:05
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 -