Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DOS copy command (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 26.09.2010, 23:46

> Why is copy that much faster and how am I able to access the file just as
> fast as copy?

Are you actually in DOS, or is Windows running? I imagine COPY might call Windows-specific interfaces (or a redirector "copy file" call, which might be hooked by Windows) so that the low-level data copying can be done faster by only using Windows code. This would cause a comparison of 21.3F's and COPY's performance inside Windows to be useless. (Potentially, there could even be more efficient undocumented functions for this in EMM386 or the kernel itself. Though I don't remember any such functions right now.)

COPY possibly aligns calls on clusters or something, but (A) ostensibly there are no (MS-)DOS interfaces that can read/write more than 64 KiB and (B) your cluster size probably is less than 64 KiB anyway so that this shouldn't give COPY an advantage. It might still be useful to know what file system and cluster size you use, and/or how this file system is accessed by DOS (redirector, block device on Int13, etc).

Maybe your code is slower somehow. Could you post it here? A simple program to read a file should not be longer than a few lines so we could easily check it.

A definite answer can possibly only be obtained by reverse-engineering the relevant code in COPY (which is a part of COMMAND.COM), and comparing that with your code. You might want to do that yourself with a disassembler or debugger.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 185 users online (0 registered, 185 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum