Mail Archives: djgpp/1998/11/01/20:56:59
Date: | Sun, 1 Nov 1998 20:56:54 -0500 (EST)
|
Message-Id: | <199811020156.UAA14497@indy.delorie.com>
|
From: | DJ Delorie <dj AT delorie DOT com>
|
To: | djgpp AT delorie DOT com
|
In-reply-to: | <363CFCB3.BD9F5D8E@cartsys.com> (message from Nate Eldredge on
|
| Sun, 01 Nov 1998 16:28:35 -0800)
|
Subject: | Re: help:michelle: fast copy, delete, move, rename
|
Reply-To: | djgpp AT delorie DOT com
|
> As for copying, if you must bum every last instruction out of your I/O
> throughput, you may need to write it in something other than DJGPP; the
> mode switch for each transfer buffer-sized is unavoidable. But IMHO,
> it's not worth the trouble.
It can be done fast in djgpp if you use the transfer buffer directly
rather than read() and write(). Just do the DOS call to read to the
tb, then the dos call to write it back out. The file handles are the
same as read() and write() use. Just avoid transferring it into
protected mode. For faster speed, use djasm to write a 16-bit
function that you first copy into the transfer buffer and then call
with a real-mode call (dpmi). It copies handle A to handle B using
the rest of the transfer buffer, then returns.
- Raw text -