delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/23/06:37:34

Date: Thu, 23 Apr 1998 13:37:07 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Javier Calleja <dismuntel AT apdo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Please, help me !!! (FP_SEG and FP_OFF problems)
In-Reply-To: <01bd6e88$c1d4d380$0100a8c0@dismuntel.ctv.es>
Message-ID: <Pine.SUN.3.91.980423133239.9918E-100000@is>
MIME-Version: 1.0

On Thu, 23 Apr 1998, Javier Calleja wrote:

>   I read your FAQ files, and I found a version of the macro wich get a =
> far pointer with one segment and offset (MK_FP macro). But I didn`t find =
> any version of the FP_SEG and FP_OFF macros.

Please read the FAQ carefully, not just to cut-and-paste ready 
solutions.  In particular, note the following excerpt from the FAQ:

  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 macros but instead rewrite the code that calls the DOS or
  BIOS service.

So please read section 18.2.  There is no miraculous way these two macros 
will work for you, because interfacing conventional memory from a DJGPP 
program is *different*.  In fact, even the version of MK_FP that the FAQ 
presents is likely to not work in some cases.  Don't use it blindly 
without understanding what's involved.

- Raw text -


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