www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/20/02:11:43

Xref: news2.mv.net comp.os.msdos.djgpp:5179
From: kingluke AT wco DOT com (Luke Rissacher)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Q: How to handle 64k segments?
Date: 20 Jun 1996 04:17:20 GMT
Organization: West Coast Online, Inc.
Lines: 32
Distribution: world
Message-ID: <4qajcg$ija@news.wco.com>
References: <19960515131942 DOT herzer AT assi2 DOT fbp DOT fh-weingarten DOT de> <4nd9db$k66 AT waldorf DOT csc DOT calpoly DOT edu>
NNTP-Posting-Host: shell.wco.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jan Louwerens (jlouwere AT galaxy DOT csc DOT calpoly DOT edu) wrote:
: Armin Herzer (herzer AT fbp DOT fh-weingarten DOT de) wrote:
: : Hello all,
: : I have the following question concerning DJGPP (v1.12mt5 and v2):
: : What must I do to copy a 64k segment (starting at DC000) into
: : an array with the size of [256][256].
: : Can someone please post me an example?
: : Thanks for your help!
: : Armin
: : Armin Herzer
: : FH Ravensburg-Weingarten
: : Postfach 1261
: : 88241 Weingarten
: : e-mail: herzer AT fbp DOT fh-weingarten.
When working in protected mode, the whole idea of segments is thrown away;
instead, the segment registers are the index of an element of what is
known as a descriptor table. The descriptor table tracks portions of
memory, and which processes have access to them.

Using DPMI interrupts, you can request (either with assembly code, or
using a djgpp system function) the creation of a table entry that is
mapped to a specific range of memory. I'm not sure of the exact interrupt
call; you can check the DPMI function reference at http://www.delorie.com.

This may seem like a pain in the ass; and it is :). A little research will
prove useful, though!

--
---------------------
|   Luke Rissacher  |
|  kingluke AT wco DOT com |
---------------------

- Raw text -


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