DOS copy command (Developers)
> 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:
- DOS copy command - georgpotthast, 26.09.2010, 21:37 (Developers)
- DOS copy command - ecm, 26.09.2010, 23:46
- DOS copy command - Japheth, 27.09.2010, 02:06
- DOS copy command - georgpotthast, 27.09.2010, 21:28
- DOS copy command - ecm, 27.09.2010, 21:40
- DOS copy command - georgpotthast, 27.09.2010, 22:46
- DOS copy command - bretjohn, 28.09.2010, 00:15
- DOS copy command - ecm, 28.09.2010, 01:16
- DOS copy command - Rugxulo, 28.09.2010, 05:37
- DOS copy command - Rugxulo, 28.09.2010, 22:40
- DOS copy command - Rugxulo, 30.09.2010, 06:51
- DOS copy command - georgpotthast, 30.09.2010, 19:59
- DOS copy command - tom, 01.10.2010, 15:12
- DOS copy command - georgpotthast, 02.10.2010, 22:56
- DOS copy command - RayeR, 08.10.2010, 10:10
- DOS copy command - georgpotthast, 02.10.2010, 22:56
- DOS copy command - tom, 01.10.2010, 15:12
- DOS copy command - georgpotthast, 30.09.2010, 19:59
- DOS copy command - Rugxulo, 30.09.2010, 06:51
- DOS copy command - nidud, 03.10.2010, 17:17
- DOS copy command - georgpotthast, 28.09.2010, 21:04
- DOS copy command - ecm, 29.09.2010, 14:05
- DOS copy command - ecm, 28.09.2010, 01:16
- DOS copy command - bretjohn, 28.09.2010, 00:15
- DOS copy command - georgpotthast, 27.09.2010, 22:46
- DOS copy command - ecm, 27.09.2010, 21:40
- DOS copy command | FATPLUS.EXE - DOS386, 13.10.2010, 04:02