delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/03/04/11:17:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Fri, 04 Mar 2005 17:49:24 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c520d1$Blat.v2.4$e2981ac0@zahav.net.il>
X-Mailer: emacs 22.0.50 (via feedmail 8 I) and Blat ver 2.4
In-reply-to: <1109949195.480836.311620@f14g2000cwb.googlegroups.com>
(ahmadwaris AT hotmail DOT com)
Subject: Re: dosmemput and dosmemget
References: <1109872127 DOT 199181 DOT 31850 AT l41g2000cwc DOT googlegroups DOT com>
<01c5208e$Blat.v2.4$1141d8a0 AT zahav DOT net DOT il>
<1109947854 DOT 819298 DOT 62120 AT l41g2000cwc DOT googlegroups DOT com>
<1109949195 DOT 480836 DOT 311620 AT f14g2000cwb DOT googlegroups DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "arizvi" <ahmadwaris AT hotmail DOT com>
> Date: 4 Mar 2005 07:13:15 -0800
> 
> To make it more clear, it is the disk address packet which I need to
> transfer to protected mode memory. The LBA number in the disk address
> packet needs to increase by one after each IO. I do the increment in
> conventional memory, and then transfer the packet to DOS using
> dosmemput. After the IO is done, I read back to status of the IO by
> doing a dosmemget. Can there be a way to eliminate the data copying
> altogether? And be able to read the status of the IO as well.

If all you need is read and write simple data types, like 32-bit
int's, I suggest using the farptr functions such as _farpeekl and
_farpokel.  (They are described in the library docs; from the shell
prompt type "info libc alpha _far" and read there.)  When you compile
with optimizations, these function expand into fast inline assembly,
usually a single MOV instruction, and that is about the fastest
possible way of accessing variables in conventional memory.

- Raw text -


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