From: "Mauro Da Ros" Newsgroups: comp.os.msdos.djgpp Subject: **HELP** direct memory access... Date: Fri, 18 Dec 1998 10:03:38 +0100 Organization: ITnet S.p.A. is not responsible of the content of this article as posted by one of its customers. Lines: 63 Message-ID: <75d67p$d2o$1@news.IT.net> NNTP-Posting-Host: bori001.pn.itnet.it Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.IT.net 913972281 13400 151.2.144.70 (18 Dec 1998 09:11:21 GMT) X-Complaints-To: news AT IT DOT net NNTP-Posting-Date: 18 Dec 1998 09:11:21 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ciao I have a numeric control with a static RAM beginning at 0xd0000. So I wrote this functions : #define RAMTAMPONE 0xd0000 external struct PAR par; // struct to store in SRAM void Dmempoke ( int ofs , unsigned char c) { _farsetsel (_dos_ds); _farnspokeb ( RAMTAMPONE + (long) ofs, c); } unsigned char Dmempeek ( int ofs ) { _farsetsel (_dos_ds); return _farnspeekb ( RAMTAMPONE + (long) ofs); } void RWRam(bool write) { // write-read the parameter struct in SRAM unsigned char *c; c = (unsigned char*)∥ if (write) { for (int i=0;i