delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/13/10:48:11

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: addressing question
Date: 13 Sep 2001 14:40:17 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 34
Message-ID: <9nqggh$4gk$1@nets3.rz.RWTH-Aachen.DE>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010913112105 DOT 354C-100000 AT is> <9nqdp9$22n2$1 AT pandora DOT alkar DOT net>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1000392017 4628 137.226.32.75 (13 Sep 2001 14:40:17 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 13 Sep 2001 14:40:17 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

dima 3141596 <dima AT rts-ukraine DOT com> wrote:

>  Ok, I have GDT with 3 valid entries: code segment, data segment and
> data segment pointed to video RAM (0x0b8000).  Than I switch to PM

You cannot do that, in a DJGPP application.  You *are* in PM, all the
time, so there's nothing to switch away from, into PM.

> How can I make it in the DJGPP ?

Use far*() functions or dosmemput().  Or reinvent what they're doing,
using inline asm, if you really believe that gains you anything.

Those functions ware added to DJGPP for a reason, see?

> but djgpp has not  far* !!!

Right. And for a good reason, too.  It violates the most basic
assumptions the C programming language makes about how the host
computer works, causing all kinds of ill effects.

> I try functions described in the farptr.h. It's work but I want to
> use C POINTERS !!!

You may want to, but DJGPP does not and will not let you. A far
pointer (as found in 16bit DOS compilers, including Borland Turbo C)
*is* not a C pointer.  I may look like one, but it isn't.




-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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