delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/13/11:50:25

Date: Tue, 13 Oct 1998 18:48:51 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: rbarbosa AT my-dejanews DOT com
cc: djgpp AT delorie DOT com
Subject: Re: Memory problem
In-Reply-To: <6vvka9$ika$1@nnrp1.dejanews.com>
Message-ID: <Pine.SUN.3.91.981013184831.4278l-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Tue, 13 Oct 1998 rbarbosa AT my-dejanews DOT com wrote:

> My
> question is this, is there any way to dump a value (x) into (n) contiguous
> memory locations starting at a given address (a).  I know memset(a, x, n)
> will do this, but memset() doesn't allow me to access protected space (like
> video RAM and such).

There's no such function in the library.  Either write your own using
_farnspokeX family, or use memset to fill a buffer, then blit that
buffer to video RAM (or wherever you want it) with dosmemput.

You can also call __djgpp_nearptr_enable and then use memset with any
address, but this desables memory protection and won't work on NT, so
I don't recommend it.

Section 18.4 of the DJGPP FAQ list might provide additional insight on
related issues.

- Raw text -


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