www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/20/04:37:15

Date: Sun, 20 Dec 1998 11:37:13 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Mauro Da Ros <daros AT elettra80 DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: **HELP** direct memory access...
In-Reply-To: <75d67p$d2o$1@news.IT.net>
Message-ID: <Pine.SUN.3.91.981220113655.27996P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Fri, 18 Dec 1998, Mauro Da Ros wrote:

> void Dmempoke ( int ofs , unsigned char c) {
>     _farsetsel (_dos_ds);
>     _farnspokeb ( RAMTAMPONE + (long) ofs, c);
> }

A minor remark: it doesn't make sense to use _farsetsel if you only
need to peek/poke a single byte.  Use _farpeekb(_dos_ds, RAMTAMPONE+ofs)
instead.

This isn't a bug, so it is not the reason for whatever problems you
have.

> it works. If i enclose in my allegro application (780 K)  it, it
> DOESN'T WORK :((((
> I think there are problems on that  _dos_ds, but I don't know
> WHAT to use !!!

The code you posted is perfectly valid, and the use of _dos_ds is okay
as well.  Most probably, the problem is elsewhere.

- Raw text -


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