www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/05/08:13:10

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1358
Path: news-dnh.mv.net!mv!news.sprintlink.net!uunet!in2.uu.net!dziuxsolim.rutgers.edu!igor.rutgers.edu!romulus.rutgers.edu!not-for-mail
From: mwilczyn AT romulus DOT rutgers DOT edu (Mark Wilczynski)
Newsgroups: comp.os.msdos.djgpp
Subject: Near Pointers in DJGPP 2.0
Date: 4 Aug 1995 17:58:46 -0400
Organization: Rutgers University LCSR
Lines: 15
Nntp-Posting-Host: romulus-fddi.rutgers.edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

I'm new to protected mode and have a problem with pointers.  I
thought that the whole point of protected mode was to get a flat
memory model.  This way you wouldn't have to deal with segments.
But it seems that I still have to use segments (selectors in this
case) to access memory.  Shouldn't you be able to just specify
an absolute address and access any memory on your system?

For example, I want to write data to a device that maps it's
buffer at 2560MB.  Is there any way to use a NEAR (offset only)
pointer to access this memory in DJGPP?  If I put 0xA0000000
into %edi I should be able to access it?  Some C or assembler
examples would be nice.

(Perhaps I'm missing something here since I'm used to programming
on 68K machines that don't have segments).

- Raw text -


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