www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/15:50:28

Message-Id: <m0yKURJ-000S2kC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: "Colin MacKenzie" <cmackenzie AT epage DOT ca>, djgpp AT delorie DOT com
Date: Wed, 1 Apr 1998 17:52:37 +0000
MIME-Version: 1.0
Subject: Re: NEAR and FAR declarators in DJGPP?
In-reply-to: <y7wU.2$qP5.66843@sapphire.mtt.net>

"Colin MacKenzie" <cmackenzie AT epage DOT ca> wrote:

> I am compiling using gcc. my program uses near and far declarators that are
> not recognized by the gcc compiler. I am assuming that the DPMI memory model
> doesn't require near and far calls. 

More or less, the near and far pointers exists but they are Selector:32 bits 
and not Segment:16 bits. GCC itself doesn't know much about it, but djgpp can 
use it, you need far pointers to access data in outside the space of your 
program.

> Can I use:
> 
> #define far
> #define near
> 
> to remove the declarators at compile-time? 

Sometimes you can, but not if you make things like MK_FP(0x40,10)

> Will my code still run? or will
> it all crash when I try to run it?

Depends on the above.

> I am linking with libaries that came with
> the source I am trying to compile, will these libraries still link properly?

16 bits libraries?

> (Crap!) I think I just answered my own question, 16bit code will not run in
> 32bit code without thunking. Does DJGPP contain a 16bit compiler? 

No.

> Is there anyway to link with the 16bit libraries?

No. You must rewrite the code.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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