delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:3889 |
From: | jlouwere AT galaxy DOT csc DOT calpoly DOT edu (Jan Louwerens) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Q: How to handle 64k segments? |
Date: | 15 May 1996 18:56:43 GMT |
Organization: | Cal Poly Computer Science Dept. |
Lines: | 23 |
Distribution: | world |
Message-ID: | <4nd9db$k66@waldorf.csc.calpoly.edu> |
References: | <19960515131942 DOT herzer AT assi2 DOT fbp DOT fh-weingarten DOT de> |
NNTP-Posting-User: | jlouwere AT galaxy DOT csc DOT calpoly DOT edu |
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? : Thanks for your help! : Armin : Armin Herzer : FH Ravensburg-Weingarten : Postfach 1261 : 88241 Weingarten : e-mail: herzer AT fbp DOT fh-weingarten. I believe DJGPP runs in protected mode with 32 bit segments, not 16 bit. Just try dereferencing pointers to copy the whole 64k. for (Index = 0; Index < 65536; Index++) { *(Dest + Index) = *(Source + Index); } Make sure Index is larger than 16 bit otherwise this will loop forever. JL
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |