www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/16/00:51:36

Xref: news2.mv.net comp.os.msdos.djgpp:3888
From: dan AT dan DOT emsphone DOT com (Dan Nelson)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Q: How to handle 64k segments?
Date: 15 May 1996 15:23:02 GMT
Organization: PSI Public Usenet Link
Lines: 25
Distribution: world
Message-ID: <4ncssm$dqo@client2.news.psi.net>
References: <19960515131942 DOT herzer AT assi2 DOT fbp DOT fh-weingarten DOT de>
NNTP-Posting-Host: 199.67.51.101
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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?

C:\> info libc.a a dosmemget
C:\> info libc.a a movedata

#include <sys/movedata.h>

void get1(void)
{
    unsigned char array[256][256];
    dosmemget(0xDC000, 65536, array);
}

void get2(void)
{
    unsigned char array[256][256];
    movedata(_dos_ds, 0xDC000, _my_ds, array, 65536);
}

	-Dan Nelson
	dan AT dan DOT emsphone DOT com

- Raw text -


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