www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/14/04:45:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: kala AT sankya DOT com (Babu Kalakrishnan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need help with FP_SEG and FP_OFF
Date: Thu, 14 Feb 2002 14:53:21 +0530
Lines: 29
Message-ID: <slrna6n0g8.3nc.kala@ganga.sankya.com>
References: <3C6B356D DOT 710D406F AT charter DOT net>
NNTP-Posting-Host: ppp-200-1-169.bng.vsnl.net.in (203.200.1.169)
X-Trace: fu-berlin.de 1013679094 49328742 203.200.1.169 (16 [76750])
X-Orig-Path: kala
User-Agent: slrn/0.9.6.2 (Linux)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 13 Feb 2002 22:56:29 -0500, Altaf <aladhani AT charter DOT net> wrote:
>Hello troubleshooter,
>
>I have just started to port an old 16bit code to DJGPP'c gcc compiler.
>I have a small segment of code which I can not port. I ueses SREGS
>structure.
>
>Here is an example. If someone can look at it and let me know how to
>translate into DJGPP's. I have been reading FAQ section 17.6 and 18.2
>and more. BUT I am still not being able to solve the mystery of
>register.
>
>My problem area is:
>FP_SEG and FP_OFF(). DJGPP does not have these two functions.
>Can I write my own? OR Can I somehow translate them into DJGPP.

Convert the entire code for calling the DOS service to use __dpmi_int
rather than intdosx. 

Note that the variable whose FP_SEG and FP_OFF you're trying to find
would be located at an address above 1MB when running under DJGPP. So
the DOS function call would most certainly not be able to access the
data from the buffer. For data to be accessible in a dos call, it has to
be located in memory below 1MB. So you'll need to first allocate a DOS
buffer and move the data there before making the IOCTL call.

Refer to section 18.2 of the DJGPP FAQ for details.

BK

- Raw text -


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